diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2015-04-21 10:02:23 +0200 |
---|---|---|
committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-05-26 17:33:29 +0200 |
commit | 9fc3f9b382e354fcdcd9e8cc202ab2c576d1b162 (patch) | |
tree | c4933bcbf824d723d85040d74cf6c6e2ef23ea92 /tests/test-checksum.c | |
parent | zebra: silence zebra_serv_un unused warning (diff) | |
download | frr-9fc3f9b382e354fcdcd9e8cc202ab2c576d1b162.tar.xz frr-9fc3f9b382e354fcdcd9e8cc202ab2c576d1b162.zip |
tests: fix warnings
While I don't see -Werror being used on tests anytime soon, there's no
reason to keep the warnings in tests unfixed.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit c313895dec3c176584d99f7b8684ddc3f9141d88)
Diffstat (limited to 'tests/test-checksum.c')
-rw-r--r-- | tests/test-checksum.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/test-checksum.c b/tests/test-checksum.c index 9672e95a1..b6741f305 100644 --- a/tests/test-checksum.c +++ b/tests/test-checksum.c @@ -46,41 +46,6 @@ typedef uint16_t testoff_t; /* Fletcher Checksum -- Refer to RFC1008. */ #define MODX 4102 -/* Accumulator phase of checksum */ -static -struct acc_vals -accumulate (u_char *buffer, testsz_t len, testoff_t off) -{ - u_int8_t *p; - u_int16_t *csum; - int i, partial_len; - struct acc_vals ret; - - csum = (u_int16_t *) (buffer + off); - *(csum) = 0; - - p = buffer; - ret.c0 = 0; - ret.c1 = 0; - - while (len != 0) - { - partial_len = MIN(len, MODX); - - for (i = 0; i < partial_len; i++) - { - ret.c0 = ret.c0 + *(p++); - ret.c1 += ret.c0; - } - - ret.c0 = ret.c0 % 255; - ret.c1 = ret.c1 % 255; - - len -= partial_len; - } - return ret; -} - /* The final reduction phase. * This one should be the original ospfd version */ |