From: Jim Meyering Date: Wed, 25 Sep 2002 08:23:54 +0000 (+0000) Subject: (eaccess): Change type of local `euid' from int to uid_t X-Git-Tag: v4.5.2~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34ba862f93c6689666a9143d0cf71c42005b908e;p=thirdparty%2Fcoreutils.git (eaccess): Change type of local `euid' from int to uid_t and add a cast, to avoid a warning about `signed and unsigned type in conditional expression'. --- diff --git a/src/test.c b/src/test.c index f7b16f27c8..41af32c391 100644 --- a/src/test.c +++ b/src/test.c @@ -154,12 +154,12 @@ static int eaccess (char *path, int mode) { struct stat st; - static int euid = -1; + static uid_t euid = -1; if (test_stat (path, &st) < 0) return (-1); - if (euid == -1) + if (euid == (uid_t) -1) euid = geteuid (); if (euid == 0)