[FFmpeg-cvslog] lavd/fbdev_enc: remove redundant assignments

Lukasz Marek git at videolan.org
Wed Apr 30 14:41:56 CEST 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Mon Apr 28 01:23:01 2014 +0200| [3050e53f2b61937bf941a200b140c208bedde489] | committer: Lukasz Marek

lavd/fbdev_enc: remove redundant assignments

Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>

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

 libavdevice/fbdev_enc.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavdevice/fbdev_enc.c b/libavdevice/fbdev_enc.c
index 96cbc13..c776d0e 100644
--- a/libavdevice/fbdev_enc.c
+++ b/libavdevice/fbdev_enc.c
@@ -190,7 +190,7 @@ static int fbdev_get_device_list(AVFormatContext *s, AVDeviceInfoList *device_li
     struct fb_fix_screeninfo fixinfo;
     char device_file[12];
     AVDeviceInfo *device = NULL;
-    int i, fd = -1, ret = 0;
+    int i, fd, ret = 0;
     const char *default_device = ff_fbdev_default_device();
 
     if (!device_list)
@@ -227,7 +227,6 @@ static int fbdev_get_device_list(AVFormatContext *s, AVDeviceInfoList *device_li
             default_device = NULL;
         }
         close(fd);
-        fd = -1;
         continue;
 
       fail_device:
@@ -236,10 +235,8 @@ static int fbdev_get_device_list(AVFormatContext *s, AVDeviceInfoList *device_li
             av_free(device->device_description);
             av_freep(&device);
         }
-        if (fd >= 0) {
+        if (fd >= 0)
             close(fd);
-            fd = -1;
-        }
         if (ret < 0)
             return ret;
     }



More information about the ffmpeg-cvslog mailing list