commit 90772a01e78ff7de2dd27b9284b99b2085542225
Author: Scott Kostyshak <[email protected]>
Date: Sat Apr 4 14:56:29 2015 -0400
Simplify code
diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp
index 2f277f6..28cbdc8 100644
--- a/src/support/Systemcall.cpp
+++ b/src/support/Systemcall.cpp
@@ -607,13 +607,11 @@ QString SystemcallPrivate::exitStatusMessage() const
int SystemcallPrivate::exitCode()
{
- if (!process_)
- return -1;
-
// From Qt's documentation, in regards to QProcess::exitCode(),
// "This value is not valid unless exitStatus() returns NormalExit"
- if (process_->exitStatus() != QProcess::NormalExit)
+ if (!process_ || process_->exitStatus() != QProcess::NormalExit)
return -1;
+
return process_->exitCode();
}