[SSSD] [PATCH] LDAP: remove unused code

Pavel Reichl preichl at redhat.com
Fri Mar 20 10:38:40 UTC 2015



On 03/20/2015 11:36 AM, Pavel Reichl wrote:
>> On Thu, Mar 19, 2015 at 03:18:11PM +0100, Pavel Reichl wrote:
>>> On 03/10/2015 03:43 PM, Sumit Bose wrote:
>>>> @@ -1982,6 +1986,36 @@ static void sdap_get_groups_process(struct 
>>>> tevent_req *subreq)
>>>>           return;
>>>>       }
>>>> +    if (state->no_members) {
>>>> +        ret = sysdb_attrs_primary_name_list(state->sysdb, state,
>>>> +                                state->groups, state->count,
>>>> + state->opts->group_map[SDAP_AT_GROUP_NAME].name,
>>>> +                                &groupnamelist);
>>>> +        if (ret != EOK) {
>>>> +            DEBUG(SSSDBG_OP_FAILURE,
>>>> +                  "sysdb_attrs_primary_name_list failed.\n");
>>>> +            tevent_req_error(req, ret);
>>>> +            return;
>>>> +        }
>>>> +
>>>> +        ret = sdap_add_incomplete_groups(state->sysdb, state->dom, 
>>>> state->opts,
>>>> +                                         groupnamelist, 
>>>> state->groups,
>>>> +                                         state->count);
>>>> +        if (ret == EOK) {
>>>> +            DEBUG(SSSDBG_TRACE_LIBS,
>>>> +                  "Reading only group data without members 
>>>> successful.\n");
>>>> +            tevent_req_done(req);
>>>> +        } else {
>>>> +            DEBUG(SSSDBG_OP_FAILURE, "sdap_add_incomplete_groups 
>>>> failed.\n");
>>>> +            tevent_req_error(req, ret);
>>>> +        }
>>>> +        return;
>>> unused code starts here
>>>> +
>>>> +        ret = sdap_save_groups(state, state->sysdb, state->dom, 
>>>> state->opts,
>>>> +                               state->groups, state->count, false,
>>>> +                               NULL, true, NULL);
>>>> +    }
>>>> +
>>> Hello,
>>>
>>> coverity found this unused code - is it OK to just remove 
>>> sdap_save_groups()
>> yes, please remove it. While you are at it I wonder if you can fix the
>> debug message (s/Reading/Writing/) above as well?
>>
>> bye,
>> Sumit
>>
> Please see this trivial patch.
>
> Thanks!
>
>
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
ci passed:

http://sssd-ci.duckdns.org/logs/job/11/23/summary.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150320/ce80dd26/attachment.html>


More information about the sssd-devel mailing list