[SSSD] [PATCH] confdb: Remove unused function confdb_get_long

Pavel Reichl preichl at redhat.com
Tue Sep 29 08:42:14 UTC 2015



On 09/29/2015 10:35 AM, Lukas Slebodnik wrote:
> On (29/09/15 10:16), Pavel Reichl wrote:
>> On 09/29/2015 10:08 AM, Lukas Slebodnik wrote:
>>> On (29/09/15 08:45), Pavel Reichl wrote:
>>>>
>>>>
>>>> On 09/29/2015 08:31 AM, Lukas Slebodnik wrote:
>>>>> On (27/09/15 12:49), Pavel Reichl wrote:
>>>>>> Hello, please see trivial patch attached.
>>>>>
>>>>> >From b9f938087973444f0ec26fc24ad68dca7ac63034 Mon Sep 17 00:00:00 2001
>>>>>> From: Pavel Reichl <reichl.pavel at gmail.com>
>>>>>> Date: Sun, 27 Sep 2015 12:34:20 +0200
>>>>>> Subject: [PATCH] confdb: Remove unused function confdb_get_long
>>>>>>
>>>>>> ---
>>>>>> src/confdb/confdb.c | 51 ---------------------------------------------------
>>>>>> 1 file changed, 51 deletions(-)
>>>>>>
>>>>>> diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
>>>>>> index c097aad7745eda4fff051c7da027776f95db0f03..eebd478f74041d2050df9edc283df43a65462340 100644
>>>>>> --- a/src/confdb/confdb.c
>>>>>> +++ b/src/confdb/confdb.c
>>>>>> @@ -475,57 +475,6 @@ failed:
>>>>>>      return ret;
>>>>>> }
>>>>>>
>>>>>> -long confdb_get_long(struct confdb_ctx *cdb,
>>>>>> -                     const char *section, const char *attribute,
>>>>>> -                     long defval, long *result)
>>>>>> -{
>>>>> Would it be better to consider this function as confdb API
>>>>> and add to src/confdb/confdb.h?
>>>>
>>>> It could be.
>>>>
>>>>> It might be useful in the future.
>>>>
>>>> I thought that out policy towards unused functions were to remove them.
>>> Could you point me to the description of such policy?
>>> I'm not aware of it.
>>
>> I don't think it's written anywhere
> Good to know. I thought I missed something
>
>> I just saw we did it repeatedly before and thought it's our general practice.
>>
> One more time:
> If we consider confdb as library than we should never remove functions.
>
> Removing functions from other parts of code is something
> else.
>
>>>
>>>> We did so in commit 2b94ab415b30861f42b68725d9231905baf8c3bd
>>> I didn't notice that patch. I'm sorry I do not have a time
>>> to follow each patchset.
>>>
>>>> We can always resurrect removed code if needed.
>>>>
>>> If we consider confdb as library than
>>> we should never remove functions.
>>
>> Then we should decide which parts of SSSD are public libraries and which are not, then we could avoid this kind of discussions.
>>
> I wrote "consider confdb as library" and not as a public library with
> stable API. And libraries many times contains function which are not used.
> So we should not remove them. Even though it would be still in git history.

Why? If we don't use them and nobody else does why do we have to keep them?

>
> Here is an answer to your question about public libraries.
> We have few *public libraries* which have maintained version script
>    libipa_hbac
>    libsss_idmap
>    libsss_nss_idmap
>    libwbclient
>    libsss_simpleifp
>
> In this case, the rule is much more stricter. It's almost prohibited
> to remove functions from them or to bump a SONAME. It would cause many troubles
> with upgrade ...
>
> LS
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>


More information about the sssd-devel mailing list