diff options
author | Jim Meyering <jim@meyering.net> | 2004-06-01 13:04:02 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-06-01 13:04:02 +0000 |
commit | ae752755d24ab10b8861dbf25a1d3d7c6b9499b6 (patch) | |
tree | 9196ac464443385bafe994aa114c3e859be27601 /src | |
parent | 4db0764f1ac769d70fa7e8743849f4887b615e39 (diff) | |
download | coreutils-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |