changeset 29356:aba22a71e58f

10l, use fopen directly instead of open + fdopen
author reimar
date Fri, 26 Jun 2009 15:28:30 +0000
parents 288044ae1f9a
children 1de6b286ceb1
files libvo/vo_fbdev.c
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_fbdev.c	Fri Jun 26 15:22:15 2009 +0000
+++ b/libvo/vo_fbdev.c	Fri Jun 26 15:28:30 2009 +0000
@@ -749,7 +749,6 @@
     struct fb_cmap *cmap;
     int vm   = flags & VOFLAG_MODESWITCHING;
     int zoom = flags & VOFLAG_SWSCALE;
-    int vt_fd;
 
     fs = flags & VOFLAG_FULLSCREEN;
 
@@ -970,12 +969,8 @@
         if (fs || vm)
             memset(frame_buffer, '\0', fb_line_len * fb_yres);
     }
-    if (vt_doit && (vt_fd = open("/dev/tty", O_WRONLY)) == -1) {
-        mp_msg(MSGT_VO, MSGL_ERR, "can't open /dev/tty: %s\n", strerror(errno));
-        vt_doit = 0;
-    }
-    if (vt_doit && !(vt_fp = fdopen(vt_fd, "w"))) {
-        mp_msg(MSGT_VO, MSGL_ERR, "can't fdopen /dev/tty: %s\n", strerror(errno));
+    if (vt_doit && !(vt_fp = fopen("/dev/tty", "w"))) {
+        mp_msg(MSGT_VO, MSGL_ERR, "can't fopen /dev/tty: %s\n", strerror(errno));
         vt_doit = 0;
     }