]> err.no Git - varnish/commitdiff
Make sure the returns have some value.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 Aug 2006 15:11:53 +0000 (15:11 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 Aug 2006 15:11:53 +0000 (15:11 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@851 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/mgt_cli.c

index 1a835540f231261cce75dd6a500fa110b4e0ebfa..edac7c60b04ea048d4c1ad28fb0c43fd673e7f30 100644 (file)
@@ -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);