summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-08-12 15:09:26 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-08-18 22:31:17 +0200
commitd3ece0fcc2b1fd60690bf7b6d04ad90c4eb48c0e (patch)
tree0b9ec9a5c93097b9eb6cfa99a104743b9ba8396d /src/corelib/plugin
parent175e81ffbdc5d41fa58b24a5447be9219ea755da (diff)
QLibrary: remove dead check
The variable `i` is initially `suffixPos + 1` and is then incremented further. It therefore can never be equal to `suffixPos` (ints don't overflow, that would be UB, and suffixPos doesn't change its value), so don't check for that. Change-Id: I3870ddf6ee550cad6c24fececf2a0b662a33d750 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 79a6cfcdf2..67df0a31a6 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -707,8 +707,7 @@ bool QLibrary::isLibrary(const QString &fileName)
bool valid = suffixPos != -1;
for (int i = suffixPos + 1; i < suffixes.count() && valid; ++i)
- if (i != suffixPos)
- (void)suffixes.at(i).toInt(&valid);
+ (void)suffixes.at(i).toInt(&valid);
return valid;
#endif
}