summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-07-03 06:47:56 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-07-03 06:53:20 (GMT)
commit012d133b2093e0949872263297c23277d0ce30d9 (patch)
treeb9d15926d8eb8a46210733444160649e821d3595
parent238c5e3025d8f48dd73f1c4060d08701444eac0d (diff)
downloadQt-012d133b2093e0949872263297c23277d0ce30d9.zip
Qt-012d133b2093e0949872263297c23277d0ce30d9.tar.gz
Qt-012d133b2093e0949872263297c23277d0ce30d9.tar.bz2
Fixed dead code possibly leading to crash.
Looks like this `&&' was meant to be `||'. QNetworkProxy::FtpCachingProxy is 5 so it's clearly impossible for type to be less than 0 and greater than QNetworkProxy::FtpCachingProxy. Reviewed-by: Aaron Kennedy
-rw-r--r--src/network/kernel/qnetworkproxy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index c2743ef..103b948 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -366,7 +366,7 @@ static QNetworkProxy::Capabilities defaultCapabilitiesForType(QNetworkProxy::Pro
int(QNetworkProxy::HostNameLookupCapability)),
};
- if (int(type) < 0 && int(type) > int(QNetworkProxy::FtpCachingProxy))
+ if (int(type) < 0 || int(type) > int(QNetworkProxy::FtpCachingProxy))
type = QNetworkProxy::DefaultProxy;
return QNetworkProxy::Capabilities(defaults[int(type)]);
}