]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make closefrom return void as per /usr/include/unistd.h (#4336)
authorJames Jones <jejones3141@gmail.com>
Mon, 13 Dec 2021 20:04:33 +0000 (14:04 -0600)
committerGitHub <noreply@github.com>
Mon, 13 Dec 2021 20:04:33 +0000 (15:04 -0500)
src/include/missing-h
src/lib/util/missing.c

index 0d1d469b49f82d96b7c73ae2b6bf138292d438c7..2ccd1411eaefd9861608311af128ae134b6f41c1 100644 (file)
@@ -166,7 +166,7 @@ int sendmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, int flags);
 #endif
 
 #ifndef HAVE_CLOSEFROM
-int            closefrom(int fd);
+void           closefrom(int fd);
 #endif
 
 #ifndef HAVE_SETLINEBUF
index e918b34e28238a5f2be9515726b719803a465ff3..9c5c41673700574630ac56294173823d882a070d 100644 (file)
@@ -548,7 +548,7 @@ int sendmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, int flags)
 #  endif
 #endif
 
-int closefrom(int fd)
+void closefrom(int fd)
 {
        int i;
        int maxfd = 256;
@@ -557,7 +557,7 @@ int closefrom(int fd)
 #  endif
 
 #ifdef F_CLOSEM
-       if (fcntl(fd, F_CLOSEM) == 0) return 0;
+       if (fcntl(fd, F_CLOSEM) == 0) return;
 #  endif
 
 #  ifdef F_MAXFD
@@ -595,7 +595,7 @@ int closefrom(int fd)
                        }
                }
                (void) closedir(dir);
-               return 0;
+               return;
        }
 #  endif
 
@@ -603,7 +603,7 @@ int closefrom(int fd)
 do_close:
 #  endif
 
-       if (fd > maxfd) return 0;
+       if (fd > maxfd) return;
 
        /*
         *      FIXME: return EINTR?
@@ -612,6 +612,6 @@ do_close:
                close(i);
        }
 
-       return 0;
+       return;
 }
 #endif