diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-11 12:46:51 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-11 22:11:01 +0100 |
commit | 84ef17ac0eecb3efc11a63c3f2c578ae78732c02 (patch) | |
tree | c62632ddf7ae57a999a89938ecaf8e590bfcc019 /smbutil.c | |
parent | 264ed29aae3407c1a6816c64813806a077ccebcb (diff) | |
download | tcpdump-84ef17ac0eecb3efc11a63c3f2c578ae78732c02.tar.gz |
Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
Diffstat (limited to 'smbutil.c')
-rw-r--r-- | smbutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -481,7 +481,7 @@ smb_fdata1(netdissect_options *ndo, case 'P': { int l = atoi(fmt + 1); - ND_TCHECK2(buf[0], l); + ND_TCHECK_LEN(buf, l); buf += l; fmt++; while (isdigit((unsigned char)*fmt)) @@ -653,7 +653,7 @@ smb_fdata1(netdissect_options *ndo, case 's': { int l = atoi(fmt + 1); - ND_TCHECK2(*buf, l); + ND_TCHECK_LEN(buf, l); ND_PRINT((ndo, "%-*.*s", l, l, buf)); buf += l; fmt++; @@ -663,7 +663,7 @@ smb_fdata1(netdissect_options *ndo, } case 'c': { - ND_TCHECK2(*buf, stringlen); + ND_TCHECK_LEN(buf, stringlen); ND_PRINT((ndo, "%-*.*s", (int)stringlen, (int)stringlen, buf)); buf += stringlen; fmt++; @@ -685,7 +685,7 @@ smb_fdata1(netdissect_options *ndo, case 'h': { int l = atoi(fmt + 1); - ND_TCHECK2(*buf, l); + ND_TCHECK_LEN(buf, l); while (l--) { ND_PRINT((ndo, "%02x", EXTRACT_U_1(buf))); buf++; |