[master] 8dd0a73fb simplify as suggested by @Dridi

Nils Goroll nils.goroll at uplex.de
Wed Jan 15 16:15:07 UTC 2020


commit 8dd0a73fb6190ef849259767f17602a7edd23bb8
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Dec 17 08:01:23 2019 +0100

    simplify as suggested by @Dridi
    
    thank you!

diff --git a/lib/libvcc/vcc_xref.c b/lib/libvcc/vcc_xref.c
index 6e43c3ccc..1d902795f 100644
--- a/lib/libvcc/vcc_xref.c
+++ b/lib/libvcc/vcc_xref.c
@@ -322,9 +322,6 @@ vcc_instance_info(struct vcc *tl, const struct symbol *sym)
 {
 
 	CHECK_OBJ_NOTNULL(sym, SYMBOL_MAGIC);
-	CHECK_OBJ_NOTNULL(sym->kind, KIND_MAGIC);
-	if (sym->kind != SYM_INSTANCE)
-		return;
 	AN(sym->rname);
 	Fc(tl, 0, "\t{ .p = &%s, .name = \"", sym->rname);
 	VCC_SymName(tl->fc, sym);
@@ -335,7 +332,7 @@ void
 VCC_InstanceInfo(struct vcc *tl)
 {
 	Fc(tl, 0, "\nconst struct vpi_ii VGC_instance_info[] = {\n");
-	VCC_WalkSymbols(tl, vcc_instance_info, SYM_NONE);
+	VCC_WalkSymbols(tl, vcc_instance_info, SYM_INSTANCE);
 	Fc(tl, 0, "\t{ .p = NULL, .name = \"\" }\n");
 	Fc(tl, 0, "};\n");
 }


More information about the varnish-commit mailing list