]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
vlan: fix bad checks in unittests
authorVictor Julien <victor@inliniac.net>
Sun, 28 Feb 2016 13:29:09 +0000 (14:29 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Mar 2016 07:54:42 +0000 (08:54 +0100)
src/decode-vlan.c
src/stream-tcp.c

index 59495594e7e6cd60430371bac710b6fd2f195337..166be0ff0a16ea3a01dd46dd4a3dd3b73c371437 100644 (file)
@@ -240,7 +240,7 @@ static int DecodeVLANtest03 (void)
     DecodeVLAN(&tv, &dtv, p, raw_vlan, sizeof(raw_vlan), NULL);
 
 
-    if(p->vlanh == NULL) {
+    if(p->vlanh[0] == NULL) {
         goto error;
     }
 
index 4c0a81d7f292ca922dad42403158cea8c4384a27..80d1b8dffde4f5652a614b49bb5d5d7c677f0244 100644 (file)
@@ -10253,7 +10253,7 @@ static int StreamTcpTest40(void)
 
     DecodeVLAN(&tv, &dtv, p, GET_PKT_DATA(p), GET_PKT_LEN(p), NULL);
 
-    if(p->vlanh == NULL) {
+    if(p->vlanh[0] == NULL) {
         SCFree(p);
         return 0;
     }