From: phk Date: Sun, 20 Aug 2006 15:11:53 +0000 (+0000) Subject: Make sure the returns have some value. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=448c6e23d36bb34448efc59a0f156735ef1c54ce;p=varnish Make sure the returns have some value. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@851 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/mgt_cli.c b/varnish-cache/bin/varnishd/mgt_cli.c index 1a835540..edac7c60 100644 --- a/varnish-cache/bin/varnishd/mgt_cli.c +++ b/varnish-cache/bin/varnishd/mgt_cli.c @@ -187,8 +187,15 @@ mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...) va_list ap; unsigned u; - if (cli_i < 0|| cli_o < 0) + if (resp != NULL) + *resp = NULL; + if (status != NULL) + *status = 0; + if (cli_i < 0|| cli_o < 0) { + if (status != NULL) + *status = CLIS_CANT; return (CLIS_CANT); + } va_start(ap, fmt); i = vasprintf(&p, fmt, ap); va_end(ap);