]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
utils: remove used variables and functions
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 5 Mar 2020 11:11:19 +0000 (12:11 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 5 Mar 2020 11:11:19 +0000 (12:11 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/utils.c

index e208cf5ea5d0f9afed3ef57fe452fdc3967a6bd3..0c6898022b1ba2e6a0962d7678de96c30005a642 100644 (file)
@@ -460,7 +460,6 @@ static char *fd_to_buf(int fd, size_t *length)
 static char *file_to_buf(const char *path, size_t *length)
 {
        __do_close_prot_errno int fd = -EBADF;
-       char buf[PATH_MAX];
 
        if (!length)
                return NULL;
@@ -489,28 +488,6 @@ FILE *fopen_cached(const char *path, const char *mode, void **caller_freed_buffe
        return f;
 }
 
-static int fd_cloexec(int fd, bool cloexec)
-{
-       int oflags, nflags;
-
-       oflags = fcntl(fd, F_GETFD, 0);
-       if (oflags < 0)
-               return -errno;
-
-       if (cloexec)
-               nflags = oflags | FD_CLOEXEC;
-       else
-               nflags = oflags & ~FD_CLOEXEC;
-
-       if (nflags == oflags)
-               return 0;
-
-       if (fcntl(fd, F_SETFD, nflags) < 0)
-               return -errno;
-
-       return 0;
-}
-
 FILE *fdopen_cached(int fd, const char *mode, void **caller_freed_buffer)
 {
        __do_free char *buf = NULL;