Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libwrap WARNS=2 fixes



details:   https://anonhg.NetBSD.org/src/rev/8db7b367d6e4
branches:  trunk
changeset: 517030:8db7b367d6e4
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Nov 05 15:05:18 2001 +0000

description:
WARNS=2 fixes

diffstat:

 lib/libwrap/socket.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (68 lines):

diff -r f9ba0178f55e -r 8db7b367d6e4 lib/libwrap/socket.c
--- a/lib/libwrap/socket.c      Mon Nov 05 15:04:54 2001 +0000
+++ b/lib/libwrap/socket.c      Mon Nov 05 15:05:18 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: socket.c,v 1.8 1999/09/10 08:59:47 itojun Exp $        */
+/*     $NetBSD: socket.c,v 1.9 2001/11/05 15:05:18 lukem Exp $ */
 
  /*
   * This module determines the type of socket (datagram, stream), the client
@@ -22,7 +22,7 @@
 #if 0
 static char sccsid[] = "@(#) socket.c 1.15 97/03/21 19:27:24";
 #else
-__RCSID("$NetBSD: socket.c,v 1.8 1999/09/10 08:59:47 itojun Exp $");
+__RCSID("$NetBSD: socket.c,v 1.9 2001/11/05 15:05:18 lukem Exp $");
 #endif
 #endif
 
@@ -163,7 +163,7 @@
 void    sock_hostname(host)
 struct host_info *host;
 {
-    struct sockaddr *sin = host->sin;
+    struct sockaddr *sinp = host->sin;
     struct hostent *hp;
     int     i;
     int af, alen;
@@ -177,18 +177,18 @@
      * have to special-case 0.0.0.0, in order to avoid false alerts from the
      * host name/address checking code below.
      */
-    if (!sin)
+    if (!sinp)
        return;
-    switch (af = sin->sa_family) {
+    switch (af = sinp->sa_family) {
     case AF_INET:
-       if (((struct sockaddr_in *)sin)->sin_addr.s_addr == 0)
+       if (((struct sockaddr_in *)sinp)->sin_addr.s_addr == 0)
            return;
-       ap = (char *)&((struct sockaddr_in *)sin)->sin_addr;
+       ap = (char *)&((struct sockaddr_in *)sinp)->sin_addr;
        alen = sizeof(struct in_addr);
        break;
 #ifdef INET6
     case AF_INET6:
-       ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr;
+       ap = (char *)&((struct sockaddr_in6 *)sinp)->sin6_addr;
        alen = sizeof(struct in6_addr);
        /* special case on reverse lookup: mapped addr.  I hate it */
        if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
@@ -275,13 +275,13 @@
 int     fd;
 {
     char    buf[BUFSIZ];
-    struct sockaddr_storage sin;
-    int     size = sizeof(sin);
+    struct sockaddr_storage sst;
+    int     size = sizeof(sst);
 
     /*
      * Eat up the not-yet received datagram. Some systems insist on a
      * non-zero source address argument in the recvfrom() call below.
      */
 
-    (void) recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *) & sin, &size);
+    (void) recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *) & sst, &size);
 }



Home | Main Index | Thread Index | Old Index