fix sign-compare issues

This commit is contained in:
lukem 2009-03-17 00:52:47 +00:00
parent 50a765e44b
commit be0c43535f
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ldconfig.c,v 1.44 2008/04/28 20:23:08 martin Exp $ */
/* $NetBSD: ldconfig.c,v 1.45 2009/03/17 00:52:47 lukem Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ldconfig.c,v 1.44 2008/04/28 20:23:08 martin Exp $");
__RCSID("$NetBSD: ldconfig.c,v 1.45 2009/03/17 00:52:47 lukem Exp $");
#endif
@ -468,7 +468,7 @@ buildhints(void)
warn("%s", _PATH_LD_HINTS);
goto out;
}
if (write(fd, blist, hdr.hh_nbucket * sizeof(struct hints_bucket)) !=
if ((size_t)write(fd, blist, hdr.hh_nbucket * sizeof(struct hints_bucket)) !=
hdr.hh_nbucket * sizeof(struct hints_bucket)) {
warn("%s", _PATH_LD_HINTS);
goto out;

View File

@ -1,4 +1,4 @@
/* $NetBSD: show.c,v 1.38 2008/09/10 01:06:58 dyoung Exp $ */
/* $NetBSD: show.c,v 1.39 2009/03/17 00:53:42 lukem Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94";
#else
__RCSID("$NetBSD: show.c,v 1.38 2008/09/10 01:06:58 dyoung Exp $");
__RCSID("$NetBSD: show.c,v 1.39 2009/03/17 00:53:42 lukem Exp $");
#endif
#endif /* not lint */
@ -357,7 +357,7 @@ p_sockaddr(struct sockaddr *sa, struct sockaddr *nm, int flags, int width)
case AF_INET6:
cp = routename(sa, nm, flags);
/* make sure numeric address is not truncated */
if (strchr(cp, ':') != NULL && strlen(cp) > width)
if (strchr(cp, ':') != NULL && (int)strlen(cp) > width)
width = strlen(cp);
break;
#endif /* INET6 */