[hackers] [ubase] Simplify a bit pw_check() || sin

From: <git_AT_suckless.org>
Date: Mon, 09 Jun 2014 13:57:49 +0200

commit 78192e87d95baa19c1810062c1d3335a0ad3285c
Author: sin <sin_AT_2f30.org>
Date: Mon Jun 9 12:53:15 2014 +0100

    Simplify a bit pw_check()

diff --git a/util/passwd.c b/util/passwd.c
index 7cec804..8e531b0 100644
--- a/util/passwd.c
+++ b/util/passwd.c
_AT_@ -17,11 +17,8 @@ pw_check(struct passwd *pw, const char *pass)
         struct spwd *spw;
 
         p = pw->pw_passwd;
- switch (pw->pw_passwd[0]) {
- case '!':
- case '*':
+ if (p[0] == '!' || p[0] == '*')
                 eprintf("denied
");
- }
 
         if (pw->pw_passwd[0] == '
Received on Mon Jun 09 2014 - 13:57:49 CEST

This archive was generated by hypermail 2.3.0 : Mon Jun 09 2014 - 14:00:10 CEST