Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/yp Fix signed/unsigned comparison warnings.



details:   https://anonhg.NetBSD.org/src/rev/e87376e63fb7
branches:  trunk
changeset: 539241:e87376e63fb7
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Nov 11 22:53:19 2002 +0000

description:
Fix signed/unsigned comparison warnings.

diffstat:

 lib/libc/yp/yplib.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 039df27353c6 -r e87376e63fb7 lib/libc/yp/yplib.c
--- a/lib/libc/yp/yplib.c       Mon Nov 11 22:35:04 2002 +0000
+++ b/lib/libc/yp/yplib.c       Mon Nov 11 22:53:19 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yplib.c,v 1.37 2000/07/06 03:14:05 christos Exp $       */
+/*     $NetBSD: yplib.c,v 1.38 2002/11/11 22:53:19 thorpej Exp $        */
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt <deraadt%fsa.ca@localhost>
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: yplib.c,v 1.37 2000/07/06 03:14:05 christos Exp $");
+__RCSID("$NetBSD: yplib.c,v 1.38 2002/11/11 22:53:19 thorpej Exp $");
 #endif
 
 #include "namespace.h"
@@ -89,8 +89,9 @@
        struct sockaddr_in clnt_sin;
        int             clnt_sock, fd, gpid;
        CLIENT         *client;
-       int             new = 0, r;
+       int             new = 0;
        int             nerrs = 0;
+       ssize_t         r;
 
        if (dom == NULL || *dom == '\0')
                return YPERR_BADARGS;
@@ -158,7 +159,7 @@
                        iov[1].iov_len = sizeof ybr;
 
                        r = readv(fd, iov, 2);
-                       if (r != iov[0].iov_len + iov[1].iov_len) {
+                       if (r != (ssize_t)(iov[0].iov_len + iov[1].iov_len)) {
                                (void)close(fd);
                                ysd->dom_vers = -1;
                                goto again;



Home | Main Index | Thread Index | Old Index