Mailing List Archive

[master] 5752421e0 Polish: Consistent use of sizeof in SML_allocobj()
commit 5752421e0219f1563ef432b748a572342f4819de
Author: Nils Goroll <nils.goroll@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);
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit