strncmp issue
Channa
channa.kad at gmail.com
Thu Apr 30 05:21:37 UTC 2009
2009/4/30 Olivier Houchard <mlfbsd at ci0.org>:
> On Wed, Apr 29, 2009 at 11:46:23AM +0530, Channa wrote:
>> 2009/4/29 Olivier Houchard <mlfbsd at ci0.org>:
>> > On Tue, Apr 28, 2009 at 07:32:14PM +0530, Channa wrote:
>> >> Hi,
>> >>
>> >> Thank you very much for your response.
>> >> I am looking forward for your fix.
>> >>
>> >> Thanks & Regards,
>> >> Channa
>> >>
>> >
>> > Hi,
>> >
>> > I just committed a fix to -CURRENT, as rev 191633.
>> > It basically just checks if the length is 0, instead of len - 1 < 0.
>> >
>> > Thanks again,
>> >
>> > Olivier
>> >
>> >
>> >
>>
>> Hi
>> Thank you very much. I used your fix and tested again.
>> When i tested as below :
>>
>> TEST 1 :
>> ret = strncmp("a", "L", -1); <----------------- ret is '0'
>>
>
> I'm a bit confused here, when I test this I get 21, which is the intended
> result. Are you sure you weren't still using the old strncmp() ?
Hi,
Yes i am using the latest version of strncmp.S in the CURRENT branch.
Sorry there was a typo i tested strncmp as
ret = strncmp("a","b",-1) <------ ret value is still '0'
I am still getting the return value as zero, it should be -1.
Thanks & Regards,
Channa
More information about the freebsd-arm
mailing list