/* try to connect to rrdcached */
status = rrdc_connect(opt_daemon);
/* 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))
{
if (! rrdc_is_connected(opt_daemon))
{
"option to set an address on the command line or set the "
"\"%s\" environment variable.",
ENV_RRDCACHED_ADDRESS);
"option to set an address on the command line or set the "
"\"%s\" environment variable.",
ENV_RRDCACHED_ADDRESS);
+ status = -1;
+ goto out;
if (opt_daemon) free(opt_daemon);
if (opt_daemon) free(opt_daemon);
- return ((status == 0) ? 0 : -1);