[FFmpeg-devel] [PATCH] avformat/http: remove never twice executable loop
Michael Niedermayer
michaelni at gmx.at
Wed May 14 21:41:16 CEST 2014
On Wed, May 14, 2014 at 09:26:52AM +0200, Tomas Härdin wrote:
> On lör, 2014-05-10 at 20:56 +0200, Michael Niedermayer wrote:
> > Fixes CID1197069
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libavformat/http.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/libavformat/http.c b/libavformat/http.c
> > index 64ca4ae..3e172e3 100644
> > --- a/libavformat/http.c
> > +++ b/libavformat/http.c
> > @@ -890,7 +890,6 @@ static int http_read_stream(URLContext *h, uint8_t *buf, int size)
> > if (!s->chunksize) {
> > char line[32];
> >
> > - for(;;) {
> > do {
> > if ((err = http_get_line(s, line, sizeof(line))) < 0)
> > return err;
> > @@ -902,8 +901,6 @@ static int http_read_stream(URLContext *h, uint8_t *buf, int size)
> >
> > if (!s->chunksize)
> > return 0;
> > - break;
> > - }
> > }
> > size = FFMIN(size, s->chunksize);
> > }
>
> Looks OK to me
applied
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140514/a9a03408/attachment.asc>
More information about the ffmpeg-devel
mailing list