selftests/kcmp: Remove unused open mode
PATCH 1/1 selftests/kcmp: Remove unused open mode
Android bionic warns that open modes are ignored if O_CREAT or O_TMPFILE aren't specified. The permissions for the file are set above:
fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);
Fixes d97b46a64674 ("syscalls, x86: add __NR_kcmp syscall")
Signed-off-by Edward Liaw <[email protected]>
--- tools/testing/selftests/kcmp/kcmp_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kcmp/kcmp_test.c +1 -1
@@ -91,7 +91,7 @@ int main(int argc, char **argv)ksft_print_header ();ksft_set_plan (3 ); - fd2 =open (kpath,O_RDWR ,0644 ); + fd2 =open (kpath,O_RDWR );if (fd2 <0 ) {perror ("Can't open file" );ksft_exit_fail ();
Signature · 1 line
2.44.0.769.g3c40516874-goog
Quoted 7 lines · Edward Liaw
Android bionic warns that open modes are ignored if
O_CREATorO_TMPFILEaren't specified. The permissions for the file are set above:fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);Fixes d97b46a64674 ("syscalls, x86: add __NR_kcmp syscall")Signed-off-by Edward Liaw <[email protected]>
Thanks!
Reviewed-by Cyrill Gorcunov <[email protected]>