diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-01-14 14:15:18 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-01-14 14:15:18 -0800 |
commit | 9d83ad9c9e8ce15d380e7b04d8ffbb73991e552f (patch) | |
tree | 8bccd5cd35058c677b2f20aa49d3ce350a6beca6 /print-nsh.c | |
parent | 3d291155a2a10868140d3e8bd7342b9150f42a0f (diff) | |
download | tcpdump-9d83ad9c9e8ce15d380e7b04d8ffbb73991e552f.tar.gz |
Clean up signed vs. unsigned warnings.
If length is a uint8_t, subtracting 2 (a value of type int) from it
yields a value of type int, so compariing it against a u_int index
causes a signed vs. unsigned warning.
Make it a u_int instead (before we subtract 2 from it, we've already
checked to make sure it's >= 2, so we know the result will never be
negative).
Diffstat (limited to 'print-nsh.c')
-rw-r--r-- | print-nsh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-nsh.c b/print-nsh.c index c97364b5..636b4d38 100644 --- a/print-nsh.c +++ b/print-nsh.c @@ -51,7 +51,7 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len) u_int n, vn; uint8_t ver; uint8_t flags; - uint8_t length; + u_int length; uint8_t md_type; uint8_t next_protocol; uint32_t service_path_id; |