[master] 5752421e0 Polish: Consistent use of sizeof in SML_allocobj()

Nils Goroll nils.goroll at uplex.de
Sun Dec 31 16:59:09 UTC 2023


commit 5752421e0219f1563ef432b748a572342f4819de
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sun Dec 31 17:31:22 2023 +0100

    Polish: Consistent use of sizeof in SML_allocobj()
    
    There are two sizeof calls here with the same semantics, make them the
    same.

diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index b91fbcb32..c34f6e394 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -148,7 +148,7 @@ SML_allocobj(struct worker *wrk, const struct stevedore *stv,
 
 	AN(stv->sml_alloc);
 
-	ltot = sizeof(struct object) + PRNDUP(wsl);
+	ltot = sizeof(*o) + PRNDUP(wsl);
 
 	do {
 		st = stv->sml_alloc(stv, ltot);


More information about the varnish-commit mailing list