r4969 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Thu Jun 17 10:46:17 CEST 2010


Author: phk
Date: 2010-06-17 10:46:17 +0200 (Thu, 17 Jun 2010)
New Revision: 4969

Modified:
   trunk/varnish-cache/bin/varnishd/common.h
   trunk/varnish-cache/bin/varnishd/hash_slinger.h
Log:
FlexeLint inspired garbage collection



Modified: trunk/varnish-cache/bin/varnishd/common.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/common.h	2010-06-17 08:45:34 UTC (rev 4968)
+++ trunk/varnish-cache/bin/varnishd/common.h	2010-06-17 08:46:17 UTC (rev 4969)
@@ -39,15 +39,12 @@
 void VCA_tweak_waiter(struct cli *cli, const char *arg);
 
 /* mgt_shmem.c */
-void *mgt_SHM_Alloc(unsigned size, const char *class, const char *type, const char *ident);
 extern struct vsc_main *VSL_stats;
-extern struct vsm_head *loghead;
 
 /* varnishd.c */
 struct vsb;
 extern struct vsb *vident;
 int Symbol_Lookup(struct vsb *vsb, void *ptr);
-extern unsigned L_arg;
 
 #define TRUST_ME(ptr)	((void*)(uintptr_t)(ptr))
 

Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_slinger.h	2010-06-17 08:45:34 UTC (rev 4968)
+++ trunk/varnish-cache/bin/varnishd/hash_slinger.h	2010-06-17 08:46:17 UTC (rev 4969)
@@ -77,26 +77,20 @@
 	int			refcnt;
 	VTAILQ_HEAD(,objcore)	objcs;
 	unsigned char		digest[DIGEST_LEN];
-	union {
-		VTAILQ_HEAD(, sess)	__u_waitinglist;
-		VTAILQ_ENTRY(objhead)	__u_coollist;
-	} __u;
-#define waitinglist __u.__u_waitinglist
-#define coollist __u.__u_coollist
+	VTAILQ_HEAD(, sess)	waitinglist;
 
 	/*----------------------------------------------------
 	 * The fields below are for the sole private use of
 	 * the hash implementation(s).
 	 */
 	union {
-		void		*filler[3];
 		struct {
 			VTAILQ_ENTRY(objhead)	u_n_hoh_list;
 			void			*u_n_hoh_head;
 		} n;
-	} u;
-#define hoh_list u.n.u_n_hoh_list
-#define hoh_head u.n.u_n_hoh_head
+	} _u;
+#define hoh_list _u.n.u_n_hoh_list
+#define hoh_head _u.n.u_n_hoh_head
 };
 
 void HSH_DeleteObjHead(struct worker *w, struct objhead *oh);




More information about the varnish-commit mailing list