Fix bits bug + overzealous replace

This commit is contained in:
Neale Pickett 2011-07-14 19:08:00 -06:00
parent 0a077184e3
commit b98a4ef5e8
1 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ main(int argc, char *argv[])
mask = ~((1 << (32-bits)) - 1);
addr &= mask;
shr = bits - 8;
shr = (32-bits) - 8;
for (i = 0; i < 256; i += 1) {
out[i].f = NULL;
@ -109,7 +109,7 @@ main(int argc, char *argv[])
char fn[9];
FILE *f;
sfprintf(stderr, fn, "%03d.pcap", octet);
sprintf(fn, "%03d.pcap", octet);
if (NULL == (f = fopen(fn, "wb"))) break;
if (-1 == pcap_open_out(&out[octet], f)) break;