linux-6.17/tools/testing/selftests/landlock/fs_test.c:5631: Test for pointer < 0 ?
David Binderman
dcb314 at hotmail.com
Tue Sep 30 09:57:09 UTC 2025
Hello there,
Static analyser cppcheck says:
linux-6.17/tools/testing/selftests/landlock/fs_test.c:5631:23: style: A pointer can not be negative so it is either pointless or an error to check if it is. [pointerLessThanZero]
Source code is
if (log_match_cursor < 0)
return (long long)log_match_cursor;
but
char *log_match_cursor = log_match;
Suggest remove code.
Regards
David Binderman
More information about the Linux-security-module-archive
mailing list