From: des Date: Mon, 30 Jun 2008 01:44:33 +0000 (+0000) Subject: The correct return value when we reach the end is -1, not 0. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c38a2393018837910eae0a1e912b251b0d4befa4;p=varnish The correct return value when we reach the end is -1, not 0. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2862 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvarnishapi/shmlog.c b/varnish-cache/lib/libvarnishapi/shmlog.c index 6b35d0eb..ef17080b 100644 --- a/varnish-cache/lib/libvarnishapi/shmlog.c +++ b/varnish-cache/lib/libvarnishapi/shmlog.c @@ -300,7 +300,7 @@ VSL_NextLog(struct VSL_data *vd, unsigned char **pp) continue; } else if (vd->keep) { if (--vd->keep == 0) - return (0); + return (-1); } if (vd->map[p[SHMLOG_TAG]] & M_SELECT) { *pp = p;