Ticket #7061: libs_libmyth_mythcdrom-linux.cpp-mangle-weird-conditional-ticket-7061

File libs_libmyth_mythcdrom-linux.cpp-mangle-weird-conditional-ticket-7061, 1.0 KB (added by Erik Hovland <erik@…>, 11 years ago)

Same patch as before but against trunk as of 2010-02-03

Line 
1Why have an empty if conditional if we don't have to.
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/libs/libmyth/mythcdrom-linux.cpp |    7 ++-----
9 1 files changed, 2 insertions(+), 5 deletions(-)
10
11
12diff --git a/mythtv/libs/libmyth/mythcdrom-linux.cpp b/mythtv/libs/libmyth/mythcdrom-linux.cpp
13index 72669a9..ba64911 100644
14--- a/mythtv/libs/libmyth/mythcdrom-linux.cpp
15+++ b/mythtv/libs/libmyth/mythcdrom-linux.cpp
16@@ -489,11 +489,8 @@ MediaStatus MythCDROMLinux::checkMedia()
17                 // grained detection of the type of data on this disc
18                 if (isMounted())
19                     onDeviceMounted();
20-                else
21-                    if (mount())
22-                        ;    // onDeviceMounted() called as side-effect
23-                    else
24-                        return setStatus(MEDIASTAT_ERROR, OpenedHere);
25+                else if (!mount()) // onDeviceMounted() called as side-effect
26+                    return setStatus(MEDIASTAT_ERROR, OpenedHere);
27 
28                 if (isMounted())
29                 {