[master] 3662d20 Use unsigned with bit-ops.

Poul-Henning Kamp phk at FreeBSD.org
Tue Jan 3 17:32:04 CET 2017


commit 3662d20a088f25306b8bf70720bcf42ccd487249
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Jan 3 16:30:50 2017 +0000

    Use unsigned with bit-ops.

diff --git a/bin/varnishd/storage/storage_file.c b/bin/varnishd/storage/storage_file.c
index 139dc02..033d325 100644
--- a/bin/varnishd/storage/storage_file.c
+++ b/bin/varnishd/storage/storage_file.c
@@ -436,8 +436,8 @@ smf_alloc(const struct stevedore *st, size_t size)
 
 	CAST_OBJ_NOTNULL(sc, st->priv, SMF_SC_MAGIC);
 	assert(size > 0);
-	size += (sc->pagesize - 1L);
-	size &= ~(sc->pagesize - 1L);
+	size += (sc->pagesize - 1UL);
+	size &= ~(sc->pagesize - 1UL);
 	Lck_Lock(&sc->mtx);
 	sc->stats->c_req++;
 	smf = alloc_smf(sc, size);



More information about the varnish-commit mailing list