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

Benoit Fouet benoit.fouet
Wed Jul 18 09:57:38 CEST 2007


Michael Niedermayer wrote:
> Hi
>
> On Mon, Jul 16, 2007 at 09:37:39PM +0200, elupus wrote:
>   
>> Hi,
>>
>> Here is a new try. Never though of that nice bitwise simplification. Nice 
>> thou.
>>     
>
> patch ok
>
> [...]
>   

applied... but please provide patches that can be applied with -p0 (or
-p1 at least)

>>      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

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




More information about the ffmpeg-devel mailing list