Mercurial > nand-ecoscentric
changeset 3181:bc2f148cfe4b
Fixed compiler warnings about variables possibly used before they are
initialized. [ Bugzilla 1001509 ]
| author | grante |
|---|---|
| date | Tue, 06 Mar 2012 19:18:09 +0000 |
| parents | 88176442e6a5 |
| children | 087a81b7ea16 |
| files | packages/net/common/current/ChangeLog packages/net/common/current/src/inet_ntop.c |
| diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/common/current/ChangeLog +++ b/packages/net/common/current/ChangeLog @@ -1,3 +1,9 @@ +2012-03-06 Grant Edwards <grant.b.edwards@gmail.com> + + * current/src/inet_ntop.c (inet_ntop6): Fixed compiler warnings + about variables possibly used before they are initialized. + [ Bugzilla 1001509 ] + 2011-03-09 Jay Foster <jay@systech.com> Sergei Gavrikov <sergei.gavrikov@gmail.com>
--- a/packages/net/common/current/src/inet_ntop.c +++ b/packages/net/common/current/src/inet_ntop.c @@ -190,7 +190,9 @@ inet_ntop6(const u_char *src, char *dst, memset(words, '\0', sizeof words); for (i = 0; i < IN6ADDRSZ; i++) words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); + best.len = 0; best.base = -1; + cur.len = 0; cur.base = -1; for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { if (words[i] == 0) {
