]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(eaccess): Change type of local `euid' from int to uid_t
authorJim Meyering <jim@meyering.net>
Wed, 25 Sep 2002 08:23:54 +0000 (08:23 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 25 Sep 2002 08:23:54 +0000 (08:23 +0000)
and add a cast, to avoid a warning about `signed and unsigned type in
conditional expression'.

src/test.c

index f7b16f27c8dd96f455513b17c8bd8e7920577e96..41af32c3912b7aba98d800dd5e7562f04d0d4959 100644 (file)
@@ -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)