Skip to content
Permalink
Browse files Browse the repository at this point in the history
whiteboard: fixup a few reversed tests (GH #446)
This is a follow-up to commit 3a3ec26.
  • Loading branch information
infrastation committed Mar 25, 2015
1 parent 7a2fd50 commit 3ed82f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions print-wb.c
Expand Up @@ -201,7 +201,7 @@ wb_id(netdissect_options *ndo,
len -= sizeof(*io) * nid;
io = (struct id_off *)(id + 1);
cp = (char *)(io + nid);
if (!ND_TTEST2(cp, len)) {
if (ND_TTEST2(cp, len)) {
ND_PRINT((ndo, "\""));
fn_print(ndo, (u_char *)cp, (u_char *)cp + len);
ND_PRINT((ndo, "\""));
Expand Down Expand Up @@ -266,7 +266,7 @@ wb_prep(netdissect_options *ndo,
}
n = EXTRACT_32BITS(&prep->pp_n);
ps = (const struct pgstate *)(prep + 1);
while (--n >= 0 && !ND_TTEST(*ps)) {
while (--n >= 0 && ND_TTEST(*ps)) {
const struct id_off *io, *ie;
char c = '<';

Expand All @@ -275,7 +275,7 @@ wb_prep(netdissect_options *ndo,
ipaddr_string(ndo, &ps->page.p_sid),
EXTRACT_32BITS(&ps->page.p_uid)));
io = (struct id_off *)(ps + 1);
for (ie = io + ps->nid; io < ie && !ND_TTEST(*io); ++io) {
for (ie = io + ps->nid; io < ie && ND_TTEST(*io); ++io) {
ND_PRINT((ndo, "%c%s:%u", c, ipaddr_string(ndo, &io->id),
EXTRACT_32BITS(&io->off)));
c = ',';
Expand Down

0 comments on commit 3ed82f4

Please sign in to comment.