mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-17 17:08:20 +02:00
(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'.
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user