diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-14 11:59:38 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-14 11:59:38 -0700 |
commit | b09a65ece69306a70044ac99ca6928eda58d7c79 (patch) | |
tree | 452e5035d9fd6149fcf85f10d2d0126061f32ed5 | |
parent | 9a18f084be56e1bb1e6cdc0f69b013380d2e1f18 (diff) | |
download | tcpdump-b09a65ece69306a70044ac99ca6928eda58d7c79.tar.gz |
This is an array of 16 character values, not a C character string.
Don't initialize it with a string, so no compiler whinges about there
being no room for a null terminator.
-rw-r--r-- | addrtoname.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addrtoname.c b/addrtoname.c index 88af3c82..fe6338d5 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -352,8 +352,10 @@ getname6(netdissect_options *ndo, const u_char *ap) return (p->name); } -static const char hex[16] = "0123456789abcdef"; - +static const char hex[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' +}; /* Find the hash node that corresponds the ether address 'ep' */ |