[master] a6dded724 gzip: Remove unnecessary output buffer TRUST_ME()
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Apr 14 15:49:05 UTC 2025
commit a6dded7248e95e95d9bae037ccc8e1b125c3cacf
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Thu Mar 13 09:47:22 2025 +0100
gzip: Remove unnecessary output buffer TRUST_ME()
Unlike the input buffer, the output buffer must be writable to be
usable. The pointer used to be const, but the restriction was lifted
without touching the macro.
Refs e633a7f885660ee76d075098810c31bdad4e5571
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index 74a7f4e0f..1bc717bf5 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -197,7 +197,7 @@ VGZ_Obuf(struct vgz *vg, void *ptr, ssize_t len)
CHECK_OBJ_NOTNULL(vg, VGZ_MAGIC);
- vg->vz.next_out = TRUST_ME(ptr);
+ vg->vz.next_out = ptr;
vg->vz.avail_out = len;
}
More information about the varnish-commit
mailing list