diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-06-26 15:28:30 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-06-26 15:28:30 +0000 |
commit | 83ed88fb96dfb000381609d8f08aacbc6e5966ff (patch) | |
tree | 4238282b3fedb9504395a7287163c53f1eee7178 | |
parent | b3e157882801d7a6a78f4d6674f1a798c079cee7 (diff) | |
download | mpv-83ed88fb96dfb000381609d8f08aacbc6e5966ff.tar.bz2 mpv-83ed88fb96dfb000381609d8f08aacbc6e5966ff.tar.xz |
10l, use fopen directly instead of open + fdopen
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29398 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libvo/vo_fbdev.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c index eb7ad56ef6..0d64702587 100644 --- a/libvo/vo_fbdev.c +++ b/libvo/vo_fbdev.c @@ -749,7 +749,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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_t height, uint32_t d_width, 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; } |