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.
1 parent ecf82be commit 2472ab6Copy full SHA for 2472ab6
src/sfptpd_misc.c
@@ -114,9 +114,10 @@ int sfptpd_find_running_programs(struct sfptpd_prog *others)
114
stream = fopen(path, "r");
115
if (stream == NULL)
116
goto next_process;
117
- if (fscanf(stream, "%*d %*s %c", &status) != 1)
118
- goto next_process;
+ res = fscanf(stream, "%*d %*s %c", &status);
119
fclose(stream);
+ if (res != 1)
120
+ goto next_process;
121
if (strchr("ZXx", status))
122
123
0 commit comments