summaryrefslogtreecommitdiff
path: root/nsswitch/pam_winbind.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-02-06 12:56:19 +0100
committerVolker Lendecke <vl@samba.org>2010-02-06 12:57:32 +0100
commit65710dae847273edb99495241e6d7b7acd303c5f (patch)
tree993c667346b9a6e90cfda95cc00b737b4d739121 /nsswitch/pam_winbind.c
parent8cb6f7ec1bdaa086e77fc865c2226151dcd602a7 (diff)
downloadsamba-65710dae847273edb99495241e6d7b7acd303c5f.tar.gz
pam_winbind: Remove a nested if-statement. Bo, please check!
Diffstat (limited to 'nsswitch/pam_winbind.c')
-rw-r--r--nsswitch/pam_winbind.c6
1 files changed, 2 insertions, 4 deletions
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';
}
}