Commit 81da6feb authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

chg: reset errno prior to calling strtol()

Otherwise we can't figure out if the last strtol() invocation failed or
parent 9534de20358f
Pipeline #13749 passed with stage
in 51 minutes and 7 seconds
......@@ -276,6 +276,7 @@
debugmsg("closing files based on /proc contents");
struct dirent *de;
while ((de = readdir(dp))) {
errno = 0;
char *end;
long fd_value = strtol(de->d_name, &end, 10);
if (end == de->d_name) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment