[master] d8f950447 vcc: Remove superfluous null checks

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Jun 30 12:35:06 UTC 2021


commit d8f950447938b0c46083a3f69f1c1d605043e7f6
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Jun 30 11:15:48 2021 +0200

    vcc: Remove superfluous null checks

diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c
index b41334b79..6c7c182d7 100644
--- a/lib/libvcc/vcc_symb.c
+++ b/lib/libvcc/vcc_symb.c
@@ -294,10 +294,10 @@ VCC_SymbolGet(struct vcc *tl, vcc_ns_t ns, vcc_kind_t kind,
 			tn2 = tn;
 		}
 		tn1 = vcc_PeekTokenFrom(tl, tn);
-		if (tn1 == NULL || tn1->tok != '.')
+		if (tn1->tok != '.')
 			break;
 		tn1 = vcc_PeekTokenFrom(tl, tn1);
-		if (tn1 == NULL || tn1->tok != ID)
+		if (tn1->tok != ID)
 			break;
 		tn = tn1;
 	}


More information about the varnish-commit mailing list