[MPlayer-cvslog] r29398 - trunk/libvo/vo_fbdev.c

reimar subversion at mplayerhq.hu
Fri Jun 26 17:28:31 CEST 2009


Author: reimar
Date: Fri Jun 26 17:28:30 2009
New Revision: 29398

Log:
10l, use fopen directly instead of open + fdopen

Modified:
   trunk/libvo/vo_fbdev.c

Modified: trunk/libvo/vo_fbdev.c
==============================================================================
--- trunk/libvo/vo_fbdev.c	Fri Jun 26 17:22:15 2009	(r29397)
+++ trunk/libvo/vo_fbdev.c	Fri Jun 26 17:28:30 2009	(r29398)
@@ -749,7 +749,6 @@ static int config(uint32_t width, uint32
     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 @@ static int config(uint32_t width, uint32
         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;
     }
 


More information about the MPlayer-cvslog mailing list