r507 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Wed Jul 19 22:06:18 CEST 2006
Author: phk
Date: 2006-07-19 22:06:18 +0200 (Wed, 19 Jul 2006)
New Revision: 507
Modified:
trunk/varnish-cache/bin/varnishd/storage_file.c
Log:
Don't explode on trim's to zero size.
Real fix should (maybe) be to callers
Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-07-19 19:49:22 UTC (rev 506)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-07-19 20:06:18 UTC (rev 507)
@@ -507,6 +507,10 @@
struct smf *smf;
struct smf_sc *sc;
+ if (size == 0) {
+ /* XXX: this should not happen */
+ return;
+ }
assert(size <= s->space);
assert(size > 0); /* XXX: seen */
smf = (struct smf *)(s->priv);
More information about the varnish-commit
mailing list