We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82baf77 + 55b00bc commit 9379b93Copy full SHA for 9379b93
src/sfptpd_misc.c
@@ -115,9 +115,10 @@ int sfptpd_find_running_programs(struct sfptpd_prog *others)
115
stream = fopen(path, "r");
116
if (stream == NULL)
117
goto next_process;
118
- if (fscanf(stream, "%*d %*s %c", &status) != 1)
119
- goto next_process;
+ res = fscanf(stream, "%*d %*s %c", &status);
120
fclose(stream);
+ if (res != 1)
121
+ goto next_process;
122
if (strchr("ZXx", status))
123
124
0 commit comments