Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/inet/inet_ntop.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/inet/inet_ntop.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- src/lib/libc/inet/inet_ntop.c 2004/05/20 22:29:02 1.1.1.1 +++ src/lib/libc/inet/inet_ntop.c 2007/01/27 21:45:36 1.1.1.2 @@ -1,4 +1,4 @@ -/* $NetBSD: inet_ntop.c,v 1.1.1.1 2004/05/20 22:29:02 christos Exp $ */ +/* $NetBSD: inet_ntop.c,v 1.1.1.2 2007/01/27 21:45:36 christos Exp $ */ /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -18,7 +18,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "Id: inet_ntop.c,v 1.1.2.1.8.1 2004/03/09 08:33:33 marka Exp"; +static const char rcsid[] = "Id: inet_ntop.c,v 1.3.18.2 2005/11/03 23:02:22 marka Exp"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -43,7 +43,7 @@ static const char rcsid[] = "Id: inet_nt # define SPRINTF(x) ((size_t)sprintf x) #endif -/* +/*% * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ @@ -139,7 +139,9 @@ inet_ntop6(src, dst, size) for (i = 0; i < NS_IN6ADDRSZ; i++) words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); best.base = -1; + best.len = 0; cur.base = -1; + cur.len = 0; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { if (words[i] == 0) { if (cur.base == -1) @@ -203,3 +205,5 @@ inet_ntop6(src, dst, size) strcpy(dst, tmp); return (dst); } + +/*! \file */