]> The Tcpdump Group git mirrors - libpcap/blobdiff - optimize.c
ptimize: move the definition of extrajmps to the block in which it's used.
[libpcap] / optimize.c
index 1336a98d4632531ae2d2885d298703d6396e49b9..2c9c4b396c02e3e060da46a28fa964606c61820c 100644 (file)
@@ -2688,7 +2688,6 @@ convert_code_r(conv_state_t *conv_state, struct icode *ic, struct block *p)
        struct slist *src;
        u_int slen;
        u_int off;
-       u_char extrajmps;       /* number of extra jumps inserted */
        struct slist **offset = NULL;
 
        if (p == 0 || isMarked(ic, p))
@@ -2812,7 +2811,8 @@ filled:
        dst->code = (u_short)p->s.code;
        dst->k = p->s.k;
        if (JT(p)) {
-               extrajmps = 0;
+               /* number of extra jumps inserted */
+               u_char extrajmps = 0;
                off = JT(p)->offset - (p->offset + slen) - 1;
                if (off >= 256) {
                    /* offset too large for branch, must add a jump */