r5649 - trunk/varnish-cache/bin/varnishd
phk at varnish-cache.org
phk at varnish-cache.org
Fri Dec 17 15:05:42 CET 2010
Author: phk
Date: 2010-12-17 15:05:40 +0100 (Fri, 17 Dec 2010)
New Revision: 5649
Modified:
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
Log:
Minor cleanup, while passing through
Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2010-12-17 13:49:17 UTC (rev 5648)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2010-12-17 14:05:40 UTC (rev 5649)
@@ -75,14 +75,11 @@
/*--------------------------------------------------------------------*/
-/*
- * Keep this in synch with man/vcl.7 and etc/default.vcl!
- */
static const char * const default_vcl =
#include "default_vcl.h"
"" ;
-/*
+/*--------------------------------------------------------------------
* Prepare the compiler command line
*/
static struct vsb *
@@ -130,6 +127,8 @@
*/
struct vcc_priv {
+ unsigned magic;
+#define VCC_PRIV_MAGIC 0x70080cb8
char *sf;
const char *vcl;
};
@@ -142,7 +141,7 @@
struct vcc_priv *vp;
int fd, i, l;
- vp = priv;
+ CAST_OBJ_NOTNULL(vp, priv, VCC_PRIV_MAGIC);
sb = vsb_newauto();
XXXAN(sb);
VCC_VCL_dir(vcc, mgt_vcl_dir);
@@ -248,6 +247,8 @@
AZ(close(sfd));
/* Run the VCC compiler in a sub-process */
+ memset(&vp, 0, sizeof vp);
+ vp.magic = VCC_PRIV_MAGIC;
vp.sf = sf;
vp.vcl = vcl;
if (SUB_run(sb, run_vcc, &vp, "VCC-compiler", -1)) {
More information about the varnish-commit
mailing list