]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Minor pppoe cleanup
authorVictor Julien <victor@inliniac.net>
Thu, 17 Oct 2013 15:41:03 +0000 (17:41 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 17 Oct 2013 15:41:03 +0000 (17:41 +0200)
cppcheck said:
[decode-pppoe.c:58] -> [decode-pppoe.c:60]: (performance, inconclusive) Variable 'pppoedh' is reassigned a value before the old one has been used if variable is no semaphore variable.

src/decode-pppoe.c

index 7f49046b5d485ef68a4d8f4ccc546c29a247e067..83e2b0962325b3372ba70620b7ccc4da75170e36 100644 (file)
@@ -55,7 +55,6 @@ void DecodePPPOEDiscovery(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint
         ENGINE_SET_EVENT(p, PPPOE_PKT_TOO_SMALL);
         return;
     }
-    p->pppoedh = NULL;
 
     p->pppoedh = (PPPOEDiscoveryHdr *)pkt;
     if (p->pppoedh == NULL)