]> The Tcpdump Group git mirrors - libpcap/blobdiff - optimize.c
On Linux, return error on interface going away, not just going down.
[libpcap] / optimize.c
index 283a6de30fa3f6b99f576cc043a68b98a6722e34..bcee9af4e07ca5a4d6dc357d80b0b767dbd7e3c3 100644 (file)
@@ -137,7 +137,7 @@ lowest_set_bit(int mask)
         * (It's currently not, in MSVC, even on 64-bit platforms, but....)
         */
        if (_BitScanForward(&bit, (unsigned int)mask) == 0)
-               return -1;      /* mask is zero */
+               abort();        /* mask is zero */
        return (int)bit;
 }
 #elif defined(MSDOS) && defined(__DJGPP__)
@@ -991,10 +991,10 @@ opt_peep(opt_state_t *opt_state, struct block *b)
         */
        if (b->s.code == (BPF_JMP|BPF_JEQ|BPF_K) &&
            !ATOMELEM(b->out_use, A_ATOM)) {
-               /*
-                * We can optimize away certain subtractions of the
-                * X register.
-                */
+               /*
+                * We can optimize away certain subtractions of the
+                * X register.
+                */
                if (last->s.code == (BPF_ALU|BPF_SUB|BPF_X)) {
                        val = b->val[X_ATOM];
                        if (opt_state->vmap[val].is_const) {
@@ -2401,7 +2401,7 @@ filled:
                if (off >= 256) {
                    /* offset too large for branch, must add a jump */
                    if (p->longjt == 0) {
-                       /* mark this instruction and retry */
+                       /* mark this instruction and retry */
                        p->longjt++;
                        return(0);
                    }
@@ -2421,7 +2421,7 @@ filled:
                if (off >= 256) {
                    /* offset too large for branch, must add a jump */
                    if (p->longjf == 0) {
-                       /* mark this instruction and retry */
+                       /* mark this instruction and retry */
                        p->longjf++;
                        return(0);
                    }
@@ -2626,7 +2626,7 @@ dot_dump_edge(struct icode *ic, struct block *block, FILE *out)
        "block1":sw -> "block3":n [label="F"];
     }
  *
- *  After install graphviz on http://www.graphviz.org/, save it as bpf.dot
+ *  After install graphviz on https://www.graphviz.org/, save it as bpf.dot
  *  and run `dot -Tpng -O bpf.dot' to draw the graph.
  */
 static int