From 99c0a75308d5e146f73755cdd6624ca87beb0ee1 Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 24 Nov 2011 10:55:18 +0000 Subject: [PATCH] properly handle the case where RRDCACHED_ADDRESS is an empty string git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2220 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rrd_client.c b/src/rrd_client.c index 51b2eb8..5481ba3 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -492,7 +492,7 @@ int rrdc_is_connected(const char *daemon_addr) /* {{{ */ * but it is not specified in the current command. * Daemon is only implied in this case if set in ENV */ - if (addr != NULL && ! strcmp(addr,"")) + if (addr != NULL && strcmp(addr,"") != 0) return 1; else return 0; @@ -657,7 +657,7 @@ int rrdc_connect (const char *addr) /* {{{ */ addr = getenv (ENV_RRDCACHED_ADDRESS); } - if (addr == NULL || ! strcmp(addr,"")) { + if (addr == NULL || strcmp(addr,"") == 0) { addr = NULL; return 0; } -- 2.11.0