From: Volker Lendecke Date: Sat, 6 Feb 2010 11:56:19 +0000 (+0100) Subject: pam_winbind: Remove a nested if-statement. Bo, please check! X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=65710dae847273edb99495241e6d7b7acd303c5f;p=kai%2Fsamba.git pam_winbind: Remove a nested if-statement. Bo, please check! --- diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index fcad15c0003..82c8c4d0e25 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -1199,10 +1199,8 @@ static bool winbind_name_list_to_sid_string_list(struct pwb_context *ctx, * It is malformated parameter here, overwrite the last ','. */ len = strlen(sid_list_buffer); - if (len) { - if (sid_list_buffer[len - 1] == ',') { - sid_list_buffer[len - 1] = '\0'; - } + if ((len != 0) && (sid_list_buffer[len - 1] == ',')) { + sid_list_buffer[len - 1] = '\0'; } }