]> The Tcpdump Group git mirrors - libpcap/blobdiff - optimize.c
Merge pull request #613 from mkubecek/mk/master/opt-unknown
[libpcap] / optimize.c
index 53e981332ec2ad5cd81f5a9227a07905e52d821f..0bf52cdd8f4f2c72c077f309b8474cf588b6ec77 100644 (file)
@@ -578,7 +578,7 @@ F(opt_state_t *opt_state, int code, int v0, int v1)
 static inline void
 vstore(struct stmt *s, int *valp, int newval, int alter)
 {
-       if (alter && *valp == newval)
+       if (alter && newval != 0 && *valp == newval)
                s->code = NOP;
        else
                *valp = newval;