(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/net: use MAP_FAILED instead of (void *)-1 in tcp_mmap

mmap() is documented to return MAP_FAILED on error, but tcp_mmap.c compares the return value against (void *)-1 and (unsigned char *)-1. Replace these with the standard MAP_FAILED macro for better readability and type safety. Signed-off-by: longlong yan <yanlonglong@kylinos.cn> Reviewed-by: Joe Damato <joe@dama.to> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260722015129.916-1-yanlonglong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>


Author longlong yan Committer Jakub Kicinski Date Commit Parent 92f0217f
+5 -5
1 changed file
+5 -5
1 changed file