summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5a0594)
raw | patch | inline | side by side (parent: d5a0594)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 4 Oct 2009 21:16:34 +0000 (21:16 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 4 Oct 2009 21:16:34 +0000 (21:16 +0000) |
src/rrd_flushcached.c | patch | blob | history |
diff --git a/src/rrd_flushcached.c b/src/rrd_flushcached.c
index 5d18a1e211549e948f863c978771dbf2c1787bf8..93b0fb57b05f32d356d2afd6145974fd88b8dbdd 100644 (file)
--- a/src/rrd_flushcached.c
+++ b/src/rrd_flushcached.c
/* try to connect to rrdcached */
status = rrdc_connect(opt_daemon);
- if (status != 0) return status;
+ if (status != 0) goto out;
if (! rrdc_is_connected(opt_daemon))
{
"option to set an address on the command line or set the "
"\"%s\" environment variable.",
ENV_RRDCACHED_ADDRESS);
- return (-1);
+ status = -1;
+ goto out;
}
status = 0;
}
}
+out:
if (opt_daemon) free(opt_daemon);
- return ((status == 0) ? 0 : -1);
+ return status;
} /* int rrd_flush */
/*