From be0a2badf776b611a352865c0e77ade706a90273 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 17 Nov 2007 18:35:36 +0000 Subject: Some cosmetics in dvd_set_speed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25071 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'stream') diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 98984c55a1..f4212dd4dc 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -108,15 +108,17 @@ static void dvd_set_speed(char *device, unsigned speed) AV_WB16(buffer + 18, 1000); AV_WB16(buffer + 26, 1000); - if ((fd = open(device, O_RDWR | O_NONBLOCK)) == -1) { + fd = open(device, O_RDWR | O_NONBLOCK); + if (fd == -1) { mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDspeedCantOpen); return; } - if (ioctl(fd, SG_IO, &sghdr) < 0) { + if (ioctl(fd, SG_IO, &sghdr) < 0) mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitFail); - } else - mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk); + else + mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk); + close(fd); #endif } -- cgit v1.2.3