diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-08-31 16:12:43 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-08-31 16:12:43 -0700 |
commit | 353fdee6a2c9bf2ecc9eb13aed247630373bfff9 (patch) | |
tree | 94ffac879d29ba2d872649754d5fd7ddcaffc9b9 /checksum.c | |
parent | f79d3e15d171a19565a0a106f24540d5f7ae5d93 (diff) | |
download | tcpdump-353fdee6a2c9bf2ecc9eb13aed247630373bfff9.tar.gz |
Get rid of warnings on systems that provide index().
Rename the variable "index" to "idx", so that if the environment in
which we're compiling tcpdump happens to declare the index() function
(the old V7 name for the function called strchr() in S3/S5 and ANSI C),
we don't get compiler warnings.
Diffstat (limited to 'checksum.c')
-rw-r--r-- | checksum.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -145,17 +145,17 @@ create_osi_cksum (const uint8_t *pptr, int checksum_offset, int length) uint32_t c0; uint32_t c1; uint16_t checksum; - int index; + int idx; c0 = 0; c1 = 0; - for (index = 0; index < length; index++) { + for (idx = 0; idx < length; idx++) { /* * Ignore the contents of the checksum field. */ - if (index == checksum_offset || - index == checksum_offset+1) { + if (idx == checksum_offset || + idx == checksum_offset+1) { c1 += c0; pptr++; } else { |