Empy or false string conversion (was :fix string to integer conversion)

Ralph Böhme slow at samba.org
Tue Mar 19 08:46:45 UTC 2019


Hi Swen,

On Tue, Mar 19, 2019 at 09:21:22AM +0100, swen wrote:
>Hi Ralph
>
>thanks for your quick reply and your review.
>
>..as always a few comments, I know you're waiting for them :-)

I'm all ear! :)

>On Mon, 2019-03-18 at 18:57 +0100, Ralph Böhme wrote:
>> On Wed, Mar 06, 2019 at 11:39:53AM +0100, swen wrote:
>> > Please review and push if happy.
>>
>> I think there are a few issues, please see the attached patchset.
>>
>> I'm wondering wich errno to return for the invalid string case. I'm
>> leaning
>> towards also returning EINVAL, not ENODATA. What do you think?
>> Jeremy?
>
>I have no strong opinion about the return value, but thought it might
>be a good idea for future use where we might want to distiguish between
>real conversion errors and just no conversion.

yeah, otoh the specs already specifiy EINVAL as error code for this case, so I'm 
leaning towards sticking with that. Maybe we can return EDOM for the case 
errror?

>[2/14] FIXUP: change error checking order;
>I don't think this is right. This way endptr won't be set in case of an
>error and that is a change in behaviour.
>What is the benefit of this re-order ?
>
>The other FIXUP [12/14] is ok with me.
>
>How do you want to proceed from here ? Do you want to process the
>patches as they are in the file or do you wnat me to integrate your
>updates into the existing patches (one would remove both patches).

FIXUP as in git rebase --interactive fixup into the preceeding commit please.

-slow

-- 
Ralph Boehme, Samba Team                https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46



More information about the samba-technical mailing list