Style checking

This commit is contained in:
Niverton 2017-09-01 23:47:20 +02:00
parent 0571e63c8a
commit 4e0bd26be3
1 changed files with 12 additions and 13 deletions

View File

@ -209,20 +209,19 @@ const char* de_command, enum deserv_t display_server)
/* Initialise user groups */ /* Initialise user groups */
/* Get pwd structure for the user to get his group id */ /* Get pwd structure for the user to get his group id */
struct passwd* pw = getpwnam(username); struct passwd* pw = getpwnam(username);
if (!pw)
if(!pw)
{ {
error_print(strerror(errno)); error_print(strerror(errno));
pam_end(login_handle, pam_result); pam_end(login_handle, pam_result);
return 1; return 1;
} }
int grp_result = initgroups(username, pw->pw_gid); int grp_result = initgroups(username, pw->pw_gid);
if (grp_result == -1) if(grp_result == -1)
{ {
error_print(strerror(errno)); error_print(strerror(errno));
pam_end(login_handle, pam_result); pam_end(login_handle, pam_result);
return 1; return 1;
} }