[FFmpeg-cvslog] r9733 - trunk/libavformat/os_support.c
Benoit Fouet
benoit.fouet
Thu Jul 19 10:17:02 CEST 2007
M?ns Rullg?rd wrote:
> benoit <subversion at mplayerhq.hu> writes:
>
>> Author: benoit
>> Date: Wed Jul 18 13:56:36 2007
>> New Revision: 9733
>>
>> Log:
>> remove useless check
>>
>> Modified:
>> trunk/libavformat/os_support.c
>>
>> Modified: trunk/libavformat/os_support.c
>> ==============================================================================
>> --- trunk/libavformat/os_support.c (original)
>> +++ trunk/libavformat/os_support.c Wed Jul 18 13:56:36 2007
>> @@ -46,13 +46,13 @@ int inet_aton (const char * str, struct
>>
>> add1 = atoi(pch);
>> pch = strpbrk(pch,".");
>> - if (pch == 0 || ++pch == 0) return 0;
>> + if (!pch) return 0;
>> add2 = atoi(pch);
>> pch = strpbrk(pch,".");
>> - if (pch == 0 || ++pch == 0) return 0;
>> + if (!pch) return 0;
>> add3 = atoi(pch);
>> pch = strpbrk(pch,".");
>> - if (pch == 0 || ++pch == 0) return 0;
>> + if (!pch) return 0;
>> add4 = atoi(pch);
>>
>
> This is wrong. The ++ is needed. Whoever wrote this code was very
> confused.
>
then the right thing to do would be:
if(!pch) return 0;
addX = atoi(++pch);
right ? tome, the check of ++pch is really unneeded
--
Ben
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-cvslog
mailing list