]> The Tcpdump Group git mirrors - libpcap/commitdiff
Another attempt to fix a "clobbered by longjmp" warning.
authorGuy Harris <[email protected]>
Sat, 27 Oct 2018 23:24:47 +0000 (16:24 -0700)
committerGuy Harris <[email protected]>
Sat, 27 Oct 2018 23:24:47 +0000 (16:24 -0700)
gencode.c

index d0e563cdb76e0f22d6a449bf30d03ffba11a587f..a7ef516bda4a60098b49b863dcdc9e8835ad3414 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -6958,8 +6958,8 @@ struct block *
 gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q)
 {
        bpf_u_int32 mask;
-       int proto = q.proto;
-       int dir = q.dir;
+       int proto;
+       int dir;
        register int vlen;
 
        /*
@@ -6969,6 +6969,8 @@ gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q)
        if (setjmp(cstate->top_ctx))
                return (NULL);
 
+       proto = q.proto;
+       dir = q.dir;
        if (s == NULL)
                vlen = 32;
        else if (q.proto == Q_DECNET) {