diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2011-05-05 21:15:33 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2011-05-05 21:15:33 +0000 |
commit | d079e29cac223c2c35d6ee90732c29c6a2ce2ebd (patch) | |
tree | 0fbf181a3b59a98a8c34c9e9d1751a477ed1f797 /epan/address_to_str.c | |
parent | 453d0a85686e332798ba43164c60947abfbefbd0 (diff) | |
download | wireshark-d079e29cac223c2c35d6ee90732c29c6a2ce2ebd.tar.gz |
Fix false positive compiler warnings:
address_to_str.c:157: warning: 'cur.len' may be used uninitialized in this function
address_to_str.c:157: warning: 'best.len' may be used uninitialized in this function
svn path=/trunk/; revision=37001
Diffstat (limited to 'epan/address_to_str.c')
-rw-r--r-- | epan/address_to_str.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/address_to_str.c b/epan/address_to_str.c index cc212a40d0..5aa1170c28 100644 --- a/epan/address_to_str.c +++ b/epan/address_to_str.c @@ -172,13 +172,14 @@ ip6_to_str_buf_len(const guchar* src, char *buf, size_t buf_len) words[i / 2] = (src[i+1] << 0); words[i / 2] |= (src[i] << 8); } - best.base = -1; - cur.base = -1; + best.base = -1; best.len = 0; + cur.base = -1; cur.len = 0; for (i = 0; i < 8; i++) { if (words[i] == 0) { - if (cur.base == -1) - cur.base = i, cur.len = 1; - else + if (cur.base == -1) { + cur.base = i; + cur.len = 1; + } else cur.len++; } else { if (cur.base != -1) { |