r4125 - in trunk/varnish-cache: bin/varnishd include
phk at projects.linpro.no
phk at projects.linpro.no
Sun Jun 21 11:44:33 CEST 2009
Author: phk
Date: 2009-06-21 11:44:33 +0200 (Sun, 21 Jun 2009)
New Revision: 4125
Modified:
trunk/varnish-cache/bin/varnishd/storage_persistent.c
trunk/varnish-cache/include/persistent.h
Log:
Remove unused struct size macros
Modified: trunk/varnish-cache/bin/varnishd/storage_persistent.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_persistent.c 2009-06-21 08:57:00 UTC (rev 4124)
+++ trunk/varnish-cache/bin/varnishd/storage_persistent.c 2009-06-21 09:44:33 UTC (rev 4125)
@@ -411,9 +411,6 @@
#undef SIZOF
assert(sizeof(struct smp_ident) == SMP_IDENT_SIZE);
- /* XXX: assert(sizeof(struct smp_sign) == SMP_SIGN_SIZE); */
- /* XXX: assert(sizeof(struct smp_object) == SMP_OBJECT_SIZE); */
- /* XXX: assert(sizeof smp_object.hash == DIGEST_LEN); */
/* Allocate softc */
ALLOC_OBJ(sc, SMP_SC_MAGIC);
Modified: trunk/varnish-cache/include/persistent.h
===================================================================
--- trunk/varnish-cache/include/persistent.h 2009-06-21 08:57:00 UTC (rev 4124)
+++ trunk/varnish-cache/include/persistent.h 2009-06-21 09:44:33 UTC (rev 4125)
@@ -96,7 +96,11 @@
#define SMP_END_STUFF 5
};
-#define SMP_IDENT_SIZE (32 + 4 + 4 + 4 + 4 + 4 + 8 + 4 + 6 * 8)
+/*
+ * The size of smp_ident should be fixed and constant across all platforms.
+ * We enforce that with the following #define and an assert in smp_init()
+ */
+#define SMP_IDENT_SIZE 112
#define SMP_IDENT_STRING "Varnish Persistent Storage Silo"
@@ -111,7 +115,6 @@
uint64_t length; /* NB: Must be last */
};
-#define SMP_SIGN_SIZE (8 + 4 + 8 + 8)
#define SMP_SIGN_SPACE (sizeof(struct smp_sign) + SHA256_LEN)
/*
@@ -123,8 +126,6 @@
uint64_t length;
};
-#define SMP_SEGMENT_SIZE (8+8)
-
/*
* Ban description
*/
@@ -147,8 +148,6 @@
uint64_t len; /* XXX: madvise */
};
-#define SMP_OBJECT_SIZE (32 + 8 + 8 + sizeof(void *) + 8)
-
/*
* Segment
*/
More information about the varnish-commit
mailing list