From 0ba4110751c6ac76cd86e86ec01bfa98da91dbd4 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 31 May 2005 21:03:58 +0000 Subject: [PATCH] Move unsigned to where it belongs, to remove a cast. --- usr.sbin/pkg_install/lib/lib.h | 4 ++-- usr.sbin/pkg_install/lib/plist.c | 7 ++++--- usr.sbin/pkg_install/lib/str.c | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h index 4722388dc670..d5fc0d2fad99 100644 --- a/usr.sbin/pkg_install/lib/lib.h +++ b/usr.sbin/pkg_install/lib/lib.h @@ -1,4 +1,4 @@ -/* $NetBSD: lib.h,v 1.74 2005/02/04 09:03:03 jlam Exp $ */ +/* $NetBSD: lib.h,v 1.75 2005/05/31 21:03:58 wiz Exp $ */ /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */ @@ -260,7 +260,7 @@ int fcexec(const char *, const char *, ...); /* String */ char *get_dash_string(char **); -void str_lowercase(char *); +void str_lowercase(unsigned char *); const char *basename_of(const char *); const char *dirname_of(const char *); const char *suffix_of(const char *); diff --git a/usr.sbin/pkg_install/lib/plist.c b/usr.sbin/pkg_install/lib/plist.c index eb5a636286d1..4cfbf7aed94c 100644 --- a/usr.sbin/pkg_install/lib/plist.c +++ b/usr.sbin/pkg_install/lib/plist.c @@ -1,11 +1,11 @@ -/* $NetBSD: plist.c,v 1.47 2005/01/06 11:59:35 agc Exp $ */ +/* $NetBSD: plist.c,v 1.48 2005/05/31 21:03:58 wiz Exp $ */ #include #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp"; #else -__RCSID("$NetBSD: plist.c,v 1.47 2005/01/06 11:59:35 agc Exp $"); +__RCSID("$NetBSD: plist.c,v 1.48 2005/05/31 21:03:58 wiz Exp $"); #endif #endif @@ -231,7 +231,8 @@ int plist_cmd(char *s, char **arg) { const cmd_t *cmdp; - char cmd[MaxPathSize + 20]; /* 20 == fudge for max cmd len */ + /* 20 == fudge for max cmd len */ + unsigned char cmd[MaxPathSize + 20]; char *cp; char *sp; diff --git a/usr.sbin/pkg_install/lib/str.c b/usr.sbin/pkg_install/lib/str.c index 10c476070499..407818933f21 100644 --- a/usr.sbin/pkg_install/lib/str.c +++ b/usr.sbin/pkg_install/lib/str.c @@ -1,11 +1,11 @@ -/* $NetBSD: str.c,v 1.53 2005/05/30 19:44:03 wiz Exp $ */ +/* $NetBSD: str.c,v 1.54 2005/05/31 21:03:58 wiz Exp $ */ #include #ifndef lint #if 0 static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp"; #else -__RCSID("$NetBSD: str.c,v 1.53 2005/05/30 19:44:03 wiz Exp $"); +__RCSID("$NetBSD: str.c,v 1.54 2005/05/31 21:03:58 wiz Exp $"); #endif #endif @@ -94,10 +94,10 @@ get_dash_string(char **s) * Lowercase a whole string */ void -str_lowercase(char *s) +str_lowercase(unsigned char *s) { for (; *s; s++) { - *s = tolower((unsigned char)*s); + *s = tolower(*s); } }