Move location of variable declaration to silence warning
authorArt Cancro <ajc@uncensored.citadel.org>
Sat, 25 Apr 2015 03:46:33 +0000 (23:46 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Sat, 25 Apr 2015 03:46:50 +0000 (23:46 -0400)
citadel/auth.c

index 07f4e9fa701bdc0cc7dc29a60e7f74fd63b38f34..74fa9ebc321b6814ac3bab1bed45e6095b41d6a2 100644 (file)
@@ -104,19 +104,19 @@ int validate_password(uid_t uid, const char *pass)
 #endif
        struct passwd *pw;
        int retval = 0;
-       int flags = 0;
-
-#ifdef PAM_DATA_SILENT
-       flags = PAM_DATA_SILENT;
-#else
-       flags = 0;
-#endif /* PAM_DATA_SILENT */
 
        if ((pw = getpwuid(uid)) == NULL) {
                return retval;
        }
 
 #ifdef HAVE_PAM_START
+
+#ifdef PAM_DATA_SILENT
+       int flags = PAM_DATA_SILENT;
+#else
+       int flags = 0;
+#endif /* PAM_DATA_SILENT */
+
        pc.conv = conv;
        pc.appdata_ptr = &data;
        data.name = pw->pw_name;