[master] 638e22a Clarify code a tiny bit, making it more understandable for FlexeLint

Poul-Henning Kamp phk at varnish-cache.org
Wed Mar 9 13:48:34 CET 2011


commit 638e22acdb045ee22320edf1eeb4522f8c0746b1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Mar 9 12:48:16 2011 +0000

    Clarify code a tiny bit, making it more understandable for FlexeLint

diff --git a/bin/varnishd/cache_vrt.c b/bin/varnishd/cache_vrt.c
index 944f583..7c7e107 100644
--- a/bin/varnishd/cache_vrt.c
+++ b/bin/varnishd/cache_vrt.c
@@ -154,13 +154,10 @@ VRT_StringList(char *d, unsigned dl, const char *p, va_list ap)
 		}
 		p = va_arg(ap, const char *);
 	}
-	if (b < e)
-		*b = '\0';
-	b++;
-	if (b > e)
+	if (b >= e)
 		return (NULL);
-	else
-		return (b);
+	*b++ = '\0';
+	return (b);
 }
 
 /*--------------------------------------------------------------------



More information about the varnish-commit mailing list