pam_winbind: Remove a nested if-statement. Bo, please check!
authorVolker Lendecke <vl@samba.org>
Sat, 6 Feb 2010 11:56:19 +0000 (12:56 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 6 Feb 2010 11:57:32 +0000 (12:57 +0100)
nsswitch/pam_winbind.c

index fcad15c0003731bf30a2b926689bd9e995e01021..82c8c4d0e251a8da81678ff3f83bc0cb5405fc04 100644 (file)
@@ -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';
                }
        }