From: phk Date: Sun, 21 Dec 2008 18:34:39 +0000 (+0000) Subject: Check close(2) status. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4237d2e4751efcc8aeee9b68c917801774633959;p=varnish Check close(2) status. Assert that we read the C-source file. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3491 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/mgt_vcc.c b/varnish-cache/bin/varnishd/mgt_vcc.c index 8b73769f..07e0860d 100644 --- a/varnish-cache/bin/varnishd/mgt_vcc.c +++ b/varnish-cache/bin/varnishd/mgt_vcc.c @@ -174,7 +174,7 @@ run_vcc(void *priv) fprintf(stderr, "Cannot write %s", vp->sf); exit (1); } - close(fd); + AZ(close(fd)); free(csrc); exit (0); } @@ -213,6 +213,7 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag) if (C_flag) { csrc = vreadfile(sf); + XXXAN(csrc); (void)fputs(csrc, stdout); free(csrc); }