Skip to content

Commit 5a26ae1

Browse files
committed
code cleanup
1 parent a9565ec commit 5a26ae1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/checkio.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ void CheckIOImpl::checkFormatString(const Token * const tok,
915915
argInfo.isKnownType() && argInfo.isArrayOrPointer() &&
916916
(!Token::Match(argInfo.typeToken, "char|wchar_t") ||
917917
argInfo.typeToken->strAt(-1) == "const")) {
918-
if (!(argInfo.isArrayOrPointer() && argInfo.element && !argInfo.typeToken->isStandardType()))
918+
if (!argInfo.element || argInfo.typeToken->isStandardType())
919919
invalidScanfArgTypeError_s(tok, numFormat, specifier, &argInfo);
920920
}
921921
if (scanf_s) {

0 commit comments

Comments
 (0)