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

Michael Niedermayer michaelni
Wed Jul 18 12:38:49 CEST 2007


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070718/24842f85/attachment.pgp>



More information about the ffmpeg-devel mailing list