pam_systemd: remove unused null check
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 15 Nov 2014 22:43:09 +0000 (23:43 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sat, 15 Nov 2014 22:47:39 +0000 (23:47 +0100)
username was already checked with isempty() and cannot be null at
this point.

CID#1237766

src/login/pam_systemd.c

index 9250a69..4974c51 100644 (file)
@@ -114,7 +114,7 @@ static int get_user_data(
         }
 
         *ret_pw = pw;
-        *ret_username = username ? username : pw->pw_name;
+        *ret_username = username;
 
         return PAM_SUCCESS;
 }