From 2a9201c1e637562f5b6f6d3777af419c59f655cd Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 14 May 2014 13:56:08 +0200 Subject: Fix error when reading newlines Fix error 'operation priorities' identified by static analysis from http://www.viva64.com/en/b/0251/ '!=' operator's priority is higher than that of the '=' Change-Id: I2668171acb506992e3a15b113682ac04ba309532 Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- src/corelib/io/qsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qsettings.cpp') diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 321525ca18..63a0266948 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -1752,7 +1752,7 @@ bool QConfFileSettingsPrivate::readIniLine(const QByteArray &data, int &dataPos, if (i == lineStart + 1) { char ch; - while (i < dataLen && ((ch = data.at(i) != '\n') && ch != '\r')) + while (i < dataLen && (((ch = data.at(i)) != '\n') && ch != '\r')) ++i; lineStart = i; } else if (!inQuotes) { -- cgit v1.2.3