[master] 417e93486 signedness fix

Nils Goroll nils.goroll at uplex.de
Sat Apr 4 15:29:06 UTC 2020


commit 417e93486405a95f204948e37b38b57ce3213b40
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sat Apr 4 17:18:06 2020 +0200

    signedness fix
    
    reported by flexelint

diff --git a/bin/varnishd/storage/storage_file.c b/bin/varnishd/storage/storage_file.c
index 0fc157ef8..8d842365e 100644
--- a/bin/varnishd/storage/storage_file.c
+++ b/bin/varnishd/storage/storage_file.c
@@ -379,7 +379,7 @@ smf_open_chunk(struct smf_sc *sc, off_t sz, off_t off, off_t *fail, off_t *sum)
 	AN(sz);
 	AZ(sz % sc->pagesize);
 
-	if (*fail < (uintmax_t)sc->pagesize * MINPAGES)
+	if (*fail < (off_t)sc->pagesize * MINPAGES)
 		return;
 
 	if (sz > 0 && sz < *fail && sz < SSIZE_MAX) {


More information about the varnish-commit mailing list