From: Alan T. DeKok Date: Mon, 26 Sep 2016 14:54:26 +0000 (-0400) Subject: fix typos X-Git-Tag: release_3_0_12~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f4a74838e92dbdf10594257a338e5be9848a2cf;p=thirdparty%2Ffreeradius-server.git fix typos --- diff --git a/src/lib/misc.c b/src/lib/misc.c index 79bae9a23dc..f81289bc228 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -1412,11 +1412,13 @@ int closefrom(int fd) while ((dp = readdir(dir)) != NULL) { my_fd = strtol(dp->d_name, &endp, 10); if (my_fd <= 0) continue; - if ((dp->d_name != endp) && !*endp) continue; + + if ((endp > dp->d_name) && *endp) continue; if (my_fd == dirfd(dir)) continue; + if ((my_fd >= fd) && (my_fd <= maxfd)) { - (void) close((int) fd); + (void) close((int) my_fd); } } (void) closedir(dir);