From: tholo Date: Mon, 25 Mar 1996 21:28:35 +0000 (+0000) Subject: Cast negative args to their unsigned type X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4ce571b5f538701a62605fd199d273b72e9c95f;p=openbsd Cast negative args to their unsigned type --- diff --git a/lib/libc/compat-43/setrgid.c b/lib/libc/compat-43/setrgid.c index f8840fea895..3442219999a 100644 --- a/lib/libc/compat-43/setrgid.c +++ b/lib/libc/compat-43/setrgid.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)setrgid.c 5.5 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: setrgid.c,v 1.2 1996/03/25 21:22:10 tholo Exp $"; +static char *rcsid = "$Id: setrgid.c,v 1.3 1996/03/25 21:28:35 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -51,5 +51,5 @@ setrgid(rgid) gid_t rgid; #endif { - return (__setregid(rgid, -1)); + return (__setregid(rgid, (gid_t)-1)); } diff --git a/lib/libc/compat-43/setruid.c b/lib/libc/compat-43/setruid.c index f512b0f0a02..5daec53dff0 100644 --- a/lib/libc/compat-43/setruid.c +++ b/lib/libc/compat-43/setruid.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)setruid.c 5.5 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: setruid.c,v 1.2 1996/03/25 21:22:11 tholo Exp $"; +static char *rcsid = "$Id: setruid.c,v 1.3 1996/03/25 21:28:36 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -51,5 +51,5 @@ setruid(ruid) uid_t ruid; #endif { - return (__setreuid(ruid, -1)); + return (__setreuid(ruid, (uid_t)-1)); }