[PATCH] lib/ldb minor fixes

Kamen Mazdrashki kamenim at samba.org
Thu Nov 13 20:16:07 MST 2014


Hi Andrew,

On Fri, Nov 14, 2014 at 2:35 AM, Kamen Mazdrashki <kamenim at samba.org> wrote:

>
>
> On Thu, Nov 13, 2014 at 5:43 AM, Andrew Bartlett <abartlet at samba.org>
> wrote:
>
>>
>> I still don't like the check for a == NULL at:
>>
>> https://github.com/kamenim/samba/commit/2966a44cd900f597aed232c963693ab85bd33f4b#diff-d7e2445ee96f1098ad238e62cf47cb92R323
>>
>> The reason I don't like it is that this function is designed not to
>> fail, and if we start checking here, for a condition that can't happen,
>> then we will start checking everywhere, as folks work to make it
>> consistent.
>>
>
>
> Well, I have changed it to fall explicitely in case 'name == null' :). See:
>
> https://github.com/kamenim/samba/commit/194658167d65f0f96e7150b1f5e5652175830999#diff-a410d07b1af338be3b0b3d1c3d62622aR131
>
> I didn't know "no fail" is the intended design as half of the calls to
> this function
> actually check the return value.
> I will change then
>
> https://github.com/kamenim/samba/commit/194658167d65f0f96e7150b1f5e5652175830999#diff-a410d07b1af338be3b0b3d1c3d62622aR131
> to always succeed and remove the check that bothers you. It is not needed
> indeed.
>

I have updated the branch (PR): https://github.com/kamenim/samba/pull/4

Reworked commits are:
https://github.com/kamenim/samba/commit/dd677c73377eae6d3f317c97e7adccfcf85cbaa8
https://github.com/kamenim/samba/commit/888a764d3045bca86a8143fe3f0d2135628fb149



>
> Cheers,
> Kamen
>
>
>
>>
>> The check for name == NULL seems reasonable, particularly if it can get
>> that way from the python.
>>
>> Thanks,
>>
>> Andrew Bartlett
>>
>> --
>> Andrew Bartlett
>> http://samba.org/~abartlet/
>> Authentication Developer, Samba Team  http://samba.org
>> Samba Developer, Catalyst IT
>> http://catalyst.net.nz/services/samba
>>
>>
>>
>>
>>
>


More information about the samba-technical mailing list