[master] e444efae5 Partially revert "tree-wide: add missing magic checks"
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Jun 5 13:53:04 UTC 2024
commit e444efae595634d48d257c963fdf1eb63c53ccc5
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Wed Jun 5 15:40:15 2024 +0200
Partially revert "tree-wide: add missing magic checks"
This reverts commit 328540c6ca58b8009d739ea542442a9d24372ce2 in the
lib/libvarnishapi/vsc.c file where no magic check could be added to
replace AN(vsm) occurrences.
We should probably look for more potential net loss of assertions from
that commit.
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index fc1f06467..7bda424ce 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -319,6 +319,7 @@ vsc_del_seg(const struct vsc *vsc, struct vsm *vsm, struct vsc_seg **spp)
struct vsc_seg *sp;
CHECK_OBJ_NOTNULL(vsc, VSC_MAGIC);
+ AN(vsm);
TAKE_OBJ_NOTNULL(sp, spp, VSC_SEG_MAGIC);
AZ(VSM_Unmap(vsm, sp->fantom));
if (sp->vj != NULL) {
@@ -342,6 +343,7 @@ vsc_add_seg(const struct vsc *vsc, struct vsm *vsm, const struct vsm_fantom *fp)
struct vsc_pt *pp;
CHECK_OBJ_NOTNULL(vsc, VSC_MAGIC);
+ AN(vsm);
ALLOC_OBJ(sp, VSC_SEG_MAGIC);
AN(sp);
More information about the varnish-commit
mailing list