summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-01 13:04:02 +0000
committerJim Meyering <jim@meyering.net>2004-06-01 13:04:02 +0000
commitae752755d24ab10b8861dbf25a1d3d7c6b9499b6 (patch)
tree9196ac464443385bafe994aa114c3e859be27601 /src
parent4db0764f1ac769d70fa7e8743849f4887b615e39 (diff)
downloadcoreutils-ae752755d24ab10b8861dbf25a1d3d7c6b9499b6.tar.xz
(correct_password, restricted_shell, main):
Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
Diffstat (limited to 'src')
-rw-r--r--src/su.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/su.c b/src/su.c
index d15d96a93..b91b8d379 100644
--- a/src/su.c
+++ b/src/su.c
@@ -293,7 +293,7 @@ correct_password (const struct passwd *pw)
}
encrypted = crypt (unencrypted, correct);
memset (unencrypted, 0, strlen (unencrypted));
- return strcmp (encrypted, correct) == 0;
+ return STREQ (encrypted, correct);
}
/* Update `environ' for the new shell based on PW, with SHELL being
@@ -415,7 +415,7 @@ restricted_shell (const char *shell)
setusershell ();
while ((line = getusershell ()) != NULL)
{
- if (*line != '#' && strcmp (line, shell) == 0)
+ if (*line != '#' && STREQ (line, shell))
{
endusershell ();
return 0;
@@ -516,7 +516,7 @@ main (int argc, char **argv)
}
}
- if (optind < argc && !strcmp (argv[optind], "-"))
+ if (optind < argc && STREQ (argv[optind], "-"))
{
simulate_login = 1;
++optind;