[FFmpeg-devel] [PATCH] emulated inet_aton doesn't fail for invalid addresses

Benoit Fouet benoit.fouet
Wed Jul 18 13:56:52 CEST 2007


Michael Niedermayer wrote:
> Hi
>
> On Wed, Jul 18, 2007 at 09:57:38AM +0200, Benoit Fouet wrote:
> [...]
>   
>>>>      add1 = atoi(pch);
>>>>      pch = strpbrk(pch,".");
>>>> -    if (pch == 0 || ++pch == 0) goto done;
>>>> +    if (pch == 0 || ++pch == 0) return 0;
>>>>     
>>>>         
>>> while unrelated ... 
>>> the ++pch == 0 makes no sense, it can never be true
>>>
>>> [...]
>>>   
>>>   
>>>       
>> i can remove them (and maybe replace pch == 0 by !pch) if you're ok
>>     
>
> ok
>
> [...]
>   
>   

done

-- 
Ben
Purple Labs S.A.
www.purplelabs.com




More information about the ffmpeg-devel mailing list