From: oetiker Date: Fri, 16 Sep 2011 13:04:31 +0000 (+0000) Subject: handling of ENV_RRDCACHED_ADDRESS: X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dcd75c750fed33f917a72034abea0e99f5beb162;p=rrdtool-all.git handling of ENV_RRDCACHED_ADDRESS: added missing brackets after if, backported fix from trunk to 1.4 while doing it -- patch by x @ zamyteam.org git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@2199 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_client.c b/program/src/rrd_client.c index e3790f6b..51b2eb8a 100644 --- a/program/src/rrd_client.c +++ b/program/src/rrd_client.c @@ -653,12 +653,14 @@ int rrdc_connect (const char *addr) /* {{{ */ { int status = 0; - if (addr == NULL) + if (addr == NULL) { addr = getenv (ENV_RRDCACHED_ADDRESS); + } - if (addr == NULL || ! strcmp(addr,"")) + if (addr == NULL || ! strcmp(addr,"")) { addr = NULL; return 0; + } pthread_mutex_lock(&lock);