Skip to content

Commit af38c07

Browse files
committed
stress-rofs: fix open success check
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent 71e806f commit af38c07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stress-rofs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static int stress_rofs_file_invalid_open_close(
551551
(*count) += 1.0;
552552

553553
fd = open(path, flags[idx], 0007);
554-
if (fd) {
554+
if (fd >= 0) {
555555
ssize_t lret;
556556
char data[1];
557557

0 commit comments

Comments
 (0)