[FFmpeg-cvslog] ffserver: check for EOF|error at loop condition

Reynaldo H. Verdejo Pinochet git at videolan.org
Fri Dec 26 23:05:00 CET 2014


ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Fri Dec 26 19:01:31 2014 -0300| [a18456a2032e49385447a1d0d2f146f65fe9a5e1] | committer: Reynaldo H. Verdejo Pinochet

ffserver: check for EOF|error at loop condition

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a18456a2032e49385447a1d0d2f146f65fe9a5e1
---

 ffserver.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 044bf6f..9472c41 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -1199,9 +1199,7 @@ static FFServerIPAddressACL* parse_dynamic_acl(FFServerStream *stream, HTTPConte
     acl = av_mallocz(sizeof(FFServerIPAddressACL));
 
     /* Build ACL */
-    for(;;) {
-        if (fgets(line, sizeof(line), f) == NULL)
-            break;
+    while (fgets(line, sizeof(line), f)) {
         line_num++;
         p = line;
         while (av_isspace(*p))



More information about the ffmpeg-cvslog mailing list