2005-02-16 Roland McGrath <roland@redhat.com>
authorroland <roland>
Thu, 17 Feb 2005 01:16:40 +0000 (01:16 +0000)
committerroland <roland>
Thu, 17 Feb 2005 01:16:40 +0000 (01:16 +0000)
* resolv/res_send.c (send_dg): Add else branch for case impossible
unless `poll' is buggy.
* inet/rexec.c (rexec_af): Use socklen_t.
* sunrpc/key_call.c (getkeyserv_handle): Likewise.
* sunrpc/rtime.c (rtime): Likewise.
* resolv/res_send.c (send_vc, send_dg): Likewise.
* nis/nis_callback.c (__nis_create_callback): Likewise.

resolv/res_send.c

index 8fb21a9..1a53e5b 100644 (file)
@@ -632,7 +632,7 @@ send_vc(res_state statp,
        /* Are we still talking to whom we want to talk to? */
        if (statp->_vcsock >= 0 && (statp->_flags & RES_F_VC) != 0) {
                struct sockaddr_in6 peer;
-               int size = sizeof peer;
+               socklen_t size = sizeof peer;
 
                if (getpeername(statp->_vcsock,
                                (struct sockaddr *)&peer, &size) < 0 ||
@@ -809,7 +809,8 @@ send_dg(res_state statp,
         int ptimeout;
        struct sockaddr_in6 from;
        static int socket_pf = 0;
-       int fromlen, resplen, seconds, n;
+       socklen_t fromlen;
+       int resplen, seconds, n;
 
        if (EXT(statp).nssocks[ns] == -1) {
                /* only try IPv6 if IPv6 NS and if not failed before */
@@ -1033,6 +1034,10 @@ send_dg(res_state statp,
                res_nclose(statp);
                return (0);
        }
+       else {
+               /* poll should not have returned > 0 in this case.  */
+               abort ();
+       }
 }
 
 #ifdef DEBUG