summaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-09-25 08:23:54 +0000
committerJim Meyering <jim@meyering.net>2002-09-25 08:23:54 +0000
commit34ba862f93c6689666a9143d0cf71c42005b908e (patch)
tree5a60f709f3fa9ea75b02856960e1845fdf4ccee2 /src/test.c
parent6b7e8621e2bd3223fcd20c3ab229bce5bdf2d96b (diff)
downloadcoreutils-34ba862f93c6689666a9143d0cf71c42005b908e.tar.xz
(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'.
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test.c b/src/test.c
index f7b16f27c..41af32c39 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)