diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-05-07 02:17:31 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-05-19 16:42:17 +0200 |
commit | f48f65d225ccf7a1ebd271b71dc0e755dac262f6 (patch) | |
tree | f2913005cf5baf816a37aee20740432343cf3f19 /lib/checksum.c | |
parent | ospf6d: Fix printf % code usage (diff) | |
download | frr-f48f65d225ccf7a1ebd271b71dc0e755dac262f6.tar.xz frr-f48f65d225ccf7a1ebd271b71dc0e755dac262f6.zip |
lib: Clean up some small static analysis warnings
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'lib/checksum.c')
-rw-r--r-- | lib/checksum.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/checksum.c b/lib/checksum.c index 43940b715..116aaafc9 100644 --- a/lib/checksum.c +++ b/lib/checksum.c @@ -58,13 +58,10 @@ fletcher_checksum(u_char * buffer, const size_t len, const uint16_t offset) { u_int8_t *p; int x, y, c0, c1; - u_int16_t checksum; + u_int16_t checksum = 0; u_int16_t *csum; size_t partial_len, i, left = len; - checksum = 0; - - if (offset != FLETCHER_CHECKSUM_VALIDATE) /* Zero the csum in the packet. */ { |