[master] e037b90 Flexelinting

Poul-Henning Kamp phk at FreeBSD.org
Wed Sep 21 11:04:04 CEST 2016


commit e037b90c33e42b6d9d8cd7ccaa6b37870fca9955
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 21 07:47:29 2016 +0000

    Flexelinting

diff --git a/bin/varnishd/cache/cache_shmlog.c b/bin/varnishd/cache/cache_shmlog.c
index a4aee4a..a927cb1 100644
--- a/bin/varnishd/cache/cache_shmlog.c
+++ b/bin/varnishd/cache/cache_shmlog.c
@@ -387,7 +387,7 @@ VSLb_bin(struct vsl_log *vsl, enum VSL_tag_e tag, ssize_t len, const void *ptr)
 	size_t ll;
 
 	assert(len >= 0);
-	AN(ptr);
+	AN(pp);
 	if (vsl_tag_is_masked(tag))
 		return;
 	vsl_sanity(vsl);
@@ -501,7 +501,7 @@ VSM_Init(void)
 	vsl_end = vsl_head->log + vsl_segsize * VSL_SEGMENTS;
 	/* Make segment_n always overflow on first log wrap to make any
 	   problems with regard to readers on that event visible */
-	vsl_segment_n = UINT_MAX - VSL_SEGMENTS + 1;
+	vsl_segment_n = UINT_MAX - (VSL_SEGMENTS - 1);
 	AZ(vsl_segment_n % VSL_SEGMENTS);
 	vsl_head->segment_n = vsl_segment_n;
 	vsl_ptr = vsl_head->log;



More information about the varnish-commit mailing list