- don't free user-supplied string (via -e)
[oweals/busybox.git] / libbb / correct_password.c
index f0b9384ea14ef1dc0b4dca086792b7617b7b32ca..255b0487067db8ac6b50cd7c9832c2ac6d968766 100644 (file)
@@ -36,7 +36,7 @@
  *
  * NULL pw means "just fake it for login with bad username" */
 
-int correct_password(const struct passwd *pw)
+int FAST_FUNC correct_password(const struct passwd *pw)
 {
        char *unencrypted, *encrypted;
        const char *correct;
@@ -59,7 +59,7 @@ int correct_password(const struct passwd *pw)
                /* getspnam_r may return 0 yet set result to NULL.
                 * At least glibc 2.4 does this. Be extra paranoid here. */
                struct spwd *result = NULL;
-               int r = getspnam_r(pw->pw_name, &spw, buffer, sizeof(buffer), &result);
+               r = getspnam_r(pw->pw_name, &spw, buffer, sizeof(buffer), &result);
                correct = (r || !result) ? "aa" : result->sp_pwdp;
        }
 #endif