]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: avoid compiler warning 2896/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Mar 2019 18:29:38 +0000 (19:29 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Mar 2019 18:29:38 +0000 (19:29 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index 794a36fef95499e6dab73dee68e6f06be5f224e7..5d381b7137469fd11d1f4d40c554a4c592f54a75 100644 (file)
@@ -2770,7 +2770,7 @@ struct lxc_conf *lxc_conf_init(void)
 int write_id_mapping(enum idtype idtype, pid_t pid, const char *buf,
                     size_t buf_size)
 {
-       __do_close_prot_errno int fd;
+       __do_close_prot_errno int fd = -EBADF;
        int ret;
        char path[PATH_MAX];