Commit 4b43bc83 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't explode on trim's to zero size.

Real fix should (maybe) be to callers



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@507 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 029b3e58
......@@ -507,6 +507,10 @@ smf_trim(struct storage *s, size_t size)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment