# HG changeset patch # User reimar # Date 1195324536 0 # Node ID e1dbd43b753dda8cf7ef903fae6749e94c5fdad4 # Parent e764cbed0175c002095ba1fe7b7cc1a36a851ebf Some cosmetics in dvd_set_speed diff -r e764cbed0175 -r e1dbd43b753d stream/stream_dvd.c --- a/stream/stream_dvd.c Sat Nov 17 18:31:26 2007 +0000 +++ b/stream/stream_dvd.c Sat Nov 17 18:35:36 2007 +0000 @@ -108,15 +108,17 @@ 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 }