Skip to content

Commit 9379b93

Browse files
committed
Merge branch 'v3_8' into v3_9
2 parents 82baf77 + 55b00bc commit 9379b93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sfptpd_misc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ int sfptpd_find_running_programs(struct sfptpd_prog *others)
115115
stream = fopen(path, "r");
116116
if (stream == NULL)
117117
goto next_process;
118-
if (fscanf(stream, "%*d %*s %c", &status) != 1)
119-
goto next_process;
118+
res = fscanf(stream, "%*d %*s %c", &status);
120119
fclose(stream);
120+
if (res != 1)
121+
goto next_process;
121122
if (strchr("ZXx", status))
122123
goto next_process;
123124

0 commit comments

Comments
 (0)