syscalls/fstat03: Fix bad fd initialization
PATCH 1/1 syscalls/fstat03: Fix bad fd initialization
passing unused pid as bad fd is wrong and slipped in during a review.
Signed-off-by Cyril Hrubis <[email protected]>
--- testcases/kernel/syscalls/fstat/fstat03.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
testcases/kernel/syscalls/fstat/fstat03.c +1 -2
@@ -25,7 +25,7 @@#define TESTFILE "test_file"static int fd_ok; -static int fd_ebadf; +static int fd_ebadf =-1 ;static struct stat stat_buf; static struct tcase {
@@ -83,7 +83,6 @@ static void run(unsigned int tc_num)static void setup (void ) { - fd_ebadf =tst_get_unused_pid (); fd_ok =SAFE_OPEN (TESTFILE ,O_RDWR |O_CREAT ,0644 ); }
Signature · 1 line
2.21.0