]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tree-wide: s/__do_close_prot_errno/__do_close/g
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 15 Mar 2020 01:38:36 +0000 (02:38 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 15 Mar 2020 01:38:36 +0000 (02:38 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
17 files changed:
src/lxc/af_unix.c
src/lxc/attach.c
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup2_devices.c
src/lxc/cmd/lxc_user_nic.c
src/lxc/commands.c
src/lxc/commands_utils.c
src/lxc/conf.c
src/lxc/file_utils.c
src/lxc/lxccontainer.c
src/lxc/memory_utils.h
src/lxc/rexec.c
src/lxc/seccomp.c
src/lxc/start.c
src/lxc/terminal.c
src/lxc/utils.c
src/lxc/uuid.c

index 04aef44ade9319b93f83bb6827d4288afe4e7456..e17208888aff688f0148e96c1c15b41a6a7cc013 100644 (file)
@@ -53,7 +53,7 @@ static ssize_t lxc_abstract_unix_set_sockaddr(struct sockaddr_un *addr,
 
 int lxc_abstract_unix_open(const char *path, int type, int flags)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        ssize_t len;
        struct sockaddr_un addr;
@@ -90,7 +90,7 @@ void lxc_abstract_unix_close(int fd)
 
 int lxc_abstract_unix_connect(const char *path)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        ssize_t len;
        struct sockaddr_un addr;
@@ -326,7 +326,7 @@ int lxc_unix_sockaddr(struct sockaddr_un *ret, const char *path)
 
 int lxc_unix_connect_type(struct sockaddr_un *addr, int type)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        ssize_t len;
 
index d147a59ed178c180945ea0574b5d3cce270890cf..d9da4ad81e03c6b9dcd9dfd764aa2f200cd22109 100644 (file)
@@ -131,7 +131,7 @@ static void lxc_proc_put_context_info(struct lxc_proc_context_info *ctx)
  */
 static int in_same_namespace(pid_t pid1, pid_t pid2, const char *ns)
 {
-       __do_close_prot_errno int ns_fd1 = -1, ns_fd2 = -1;
+       __do_close int ns_fd1 = -1, ns_fd2 = -1;
        int ret = -1;
        struct stat ns_st1, ns_st2;
 
index 462ee3696c4d2d8a8367d6dc6c368dd09a71a79d..b78779ef77de6957c8c93058bf71ef090160a574 100644 (file)
@@ -494,7 +494,7 @@ static int cg_legacy_handle_cpuset_hierarchy(struct hierarchy *h,
                                             const char *cgroup_leaf)
 {
        __do_free char *parent_cgroup = NULL, *child_cgroup = NULL, *dup = NULL;
-       __do_close_prot_errno int cgroup_fd = -EBADF;
+       __do_close int cgroup_fd = -EBADF;
        int fret = -1;
        int ret;
        char v;
@@ -1169,10 +1169,10 @@ static void cgroup_remove_leaf(struct hierarchy *h, bool payload)
        __do_free char *full_path = NULL;
 
        if (payload) {
-               __lxc_unused __do_close_prot_errno int fd = move_fd(h->cgfd_con);
+               __lxc_unused __do_close int fd = move_fd(h->cgfd_con);
                full_path = move_ptr(h->container_full_path);
        } else {
-               __lxc_unused __do_close_prot_errno int fd = move_fd(h->cgfd_mon);
+               __lxc_unused __do_close int fd = move_fd(h->cgfd_mon);
                full_path = move_ptr(h->monitor_full_path);
        }
 
@@ -1866,7 +1866,7 @@ static bool cg_legacy_freeze(struct cgroup_ops *ops)
 static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
                                    struct lxc_epoll_descr *descr)
 {
-       __do_close_prot_errno int duped_fd = -EBADF;
+       __do_close int duped_fd = -EBADF;
        __do_free char *line = NULL;
        __do_fclose FILE *f = NULL;
        int state = PTR_TO_INT(cbdata);
@@ -1899,7 +1899,7 @@ static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
 
 static int cg_unified_freeze(struct cgroup_ops *ops, int timeout)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        __do_lxc_mainloop_close struct lxc_epoll_descr *descr_ptr = NULL;
        int ret;
        struct lxc_epoll_descr descr;
@@ -1967,7 +1967,7 @@ static int cg_legacy_unfreeze(struct cgroup_ops *ops)
 
 static int cg_unified_unfreeze(struct cgroup_ops *ops, int timeout)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        __do_lxc_mainloop_close struct lxc_epoll_descr *descr_ptr = NULL;
        int ret;
        struct lxc_epoll_descr descr;
@@ -2099,7 +2099,7 @@ static int cgroup_attach_leaf(int unified_fd, int64_t pid)
 
 int cgroup_attach(const char *name, const char *lxcpath, int64_t pid)
 {
-       __do_close_prot_errno int unified_fd = -EBADF;
+       __do_close int unified_fd = -EBADF;
 
        unified_fd = lxc_cmd_get_cgroup2_fd(name, lxcpath);
        if (unified_fd < 0)
@@ -2121,7 +2121,7 @@ static int __cg_unified_attach(const struct hierarchy *h, const char *name,
                               const char *lxcpath, pid_t pid,
                               const char *controller)
 {
-       __do_close_prot_errno int unified_fd = -EBADF;
+       __do_close int unified_fd = -EBADF;
        int ret;
 
        ret = cgroup_attach(name, lxcpath, pid);
index eef4647b09f1b11ed06df64a97292022a83d55e9..11e2bdd986e187c27202bbb62fdcf50c461109e3 100644 (file)
@@ -341,7 +341,7 @@ int bpf_program_cgroup_attach(struct bpf_program *prog, int type,
                              const char *path, uint32_t flags)
 {
        __do_free char *copy = NULL;
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        union bpf_attr attr;
        int ret;
 
@@ -396,7 +396,7 @@ int bpf_program_cgroup_attach(struct bpf_program *prog, int type,
 int bpf_program_cgroup_detach(struct bpf_program *prog)
 {
        int ret;
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
 
        if (!prog)
                return 0;
index f2388a5b4c1af1f5851af51916d1efb650109ac0..7a2e47011b7ea07ddd68765af81a61ef64099822 100644 (file)
@@ -73,7 +73,7 @@ __noreturn static void usage(bool fail)
 
 static int open_and_lock(const char *path)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        struct flock lk;
 
index 08fada3ac2939241e2dc3cb25ce3d3844aa9dfde..204af14f3060e6ce70af45dd70bcdea1e2958f25 100644 (file)
@@ -111,7 +111,7 @@ static const char *lxc_cmd_str(lxc_cmd_t cmd)
  */
 static int lxc_cmd_rsp_recv(int sock, struct lxc_cmd_rr *cmd)
 {
-       __do_close_prot_errno int fd_rsp = -EBADF;
+       __do_close int fd_rsp = -EBADF;
        int ret;
        struct lxc_cmd_rsp *rsp = &cmd->rsp;
 
@@ -214,7 +214,7 @@ static int lxc_cmd_rsp_send(int fd, struct lxc_cmd_rsp *rsp)
 static int lxc_cmd_send(const char *name, struct lxc_cmd_rr *cmd,
                        const char *lxcpath, const char *hashed_sock_name)
 {
-       __do_close_prot_errno int client_fd = -EBADF;
+       __do_close int client_fd = -EBADF;
        ssize_t ret = -1;
 
        client_fd = lxc_cmd_connect(name, lxcpath, hashed_sock_name, "command");
@@ -267,7 +267,7 @@ static int lxc_cmd_send(const char *name, struct lxc_cmd_rr *cmd,
 static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
                   const char *lxcpath, const char *hashed_sock_name)
 {
-       __do_close_prot_errno int client_fd = -EBADF;
+       __do_close int client_fd = -EBADF;
        int ret = -1;
        bool stay_connected = false;
 
@@ -898,7 +898,7 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath,
                             lxc_state_t states[MAX_STATE],
                             int *state_client_fd)
 {
-       __do_close_prot_errno int clientfd = -EBADF;
+       __do_close int clientfd = -EBADF;
        int state, stopped;
        ssize_t ret;
        struct lxc_cmd_rr cmd = {
@@ -1217,7 +1217,7 @@ static int lxc_cmd_seccomp_notify_add_listener_callback(int fd,
 
 #ifdef HAVE_SECCOMP_NOTIFY
        int ret;
-       __do_close_prot_errno int recv_fd = -EBADF;
+       __do_close int recv_fd = -EBADF;
 
        ret = lxc_abstract_unix_recv_fds(fd, &recv_fd, 1, NULL, 0);
        if (ret <= 0) {
@@ -1505,7 +1505,7 @@ out_close:
 static int lxc_cmd_accept(int fd, uint32_t events, void *data,
                          struct lxc_epoll_descr *descr)
 {
-       __do_close_prot_errno int connection = -EBADF;
+       __do_close int connection = -EBADF;
        int opt = 1, ret = -1;
 
        connection = accept(fd, NULL, 0);
@@ -1531,7 +1531,7 @@ static int lxc_cmd_accept(int fd, uint32_t events, void *data,
 
 int lxc_cmd_init(const char *name, const char *lxcpath, const char *suffix)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        char path[LXC_AUDS_ADDR_LEN] = {0};
 
index dbc06bf3344e6564880e53f250c189ea45dc0eae..2f2670d748f8a7d5a4d7a85c27dcd8c54d35fc0f 100644 (file)
@@ -57,7 +57,7 @@ int lxc_cmd_sock_rcv_state(int state_client_fd, int timeout)
 int lxc_cmd_sock_get_state(const char *name, const char *lxcpath,
                           lxc_state_t states[MAX_STATE], int timeout)
 {
-       __do_close_prot_errno int state_client_fd = -EBADF;
+       __do_close int state_client_fd = -EBADF;
        int ret;
 
        ret = lxc_cmd_add_state_client(name, lxcpath, states, &state_client_fd);
index 0113079f4579d20416ac73a43391f12fce55fe3b..08e6da29e9104e1c4ffee8916e05695bcf0bd109 100644 (file)
@@ -1380,7 +1380,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
  */
 static int lxc_pivot_root(const char *rootfs)
 {
-       __do_close_prot_errno int oldroot = -EBADF, newroot = -EBADF;
+       __do_close int oldroot = -EBADF, newroot = -EBADF;
        int ret;
 
        oldroot = open("/", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
@@ -2193,7 +2193,7 @@ static const char nesting_helpers[] =
 FILE *make_anonymous_mount_file(struct lxc_list *mount,
                                bool include_nesting_helpers)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        FILE *f;
        int ret;
        char *mount_entry;
@@ -2567,12 +2567,12 @@ 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 = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        char path[PATH_MAX];
 
        if (geteuid() != 0 && idtype == ID_TYPE_GID) {
-               __do_close_prot_errno int setgroups_fd = -EBADF;
+               __do_close int setgroups_fd = -EBADF;
 
                ret = snprintf(path, PATH_MAX, "/proc/%d/setgroups", pid);
                if (ret < 0 || ret >= PATH_MAX)
@@ -3018,7 +3018,7 @@ void remount_all_slave(void)
 {
        __do_free char *line = NULL;
        __do_fclose FILE *f = NULL;
-       __do_close_prot_errno int memfd = -EBADF, mntinfo_fd = -EBADF;
+       __do_close int memfd = -EBADF, mntinfo_fd = -EBADF;
        int ret;
        ssize_t copied;
        size_t len = 0;
index 747e5c18cf31b1f12a2c3bd198e4d61f9394cc23..ab445751bda9682847d1d5075fdcb9d8c8e58d93 100644 (file)
@@ -27,7 +27,7 @@ int lxc_open_dirfd(const char *dir)
 
 int lxc_readat(int dirfd, const char *filename, void *buf, size_t count)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        ssize_t ret;
 
        fd = openat(dirfd, filename, O_RDONLY | O_CLOEXEC);
@@ -43,7 +43,7 @@ int lxc_readat(int dirfd, const char *filename, void *buf, size_t count)
 
 int lxc_writeat(int dirfd, const char *filename, const void *buf, size_t count)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        ssize_t ret;
 
        fd = openat(dirfd, filename,
@@ -61,7 +61,7 @@ int lxc_writeat(int dirfd, const char *filename, const void *buf, size_t count)
 int lxc_write_openat(const char *dir, const char *filename, const void *buf,
                     size_t count)
 {
-       __do_close_prot_errno int dirfd = -EBADF;
+       __do_close int dirfd = -EBADF;
 
        dirfd = open(dir, O_DIRECTORY | O_RDONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW);
        if (dirfd < 0)
@@ -73,7 +73,7 @@ int lxc_write_openat(const char *dir, const char *filename, const void *buf,
 int lxc_write_to_file(const char *filename, const void *buf, size_t count,
                      bool add_newline, mode_t mode)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        ssize_t ret;
 
        fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, mode);
@@ -98,7 +98,7 @@ int lxc_write_to_file(const char *filename, const void *buf, size_t count,
 
 int lxc_read_from_file(const char *filename, void *buf, size_t count)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        ssize_t ret;
 
        fd = open(filename, O_RDONLY | O_CLOEXEC);
@@ -203,7 +203,7 @@ ssize_t lxc_read_nointr_expect(int fd, void *buf, size_t count,
 ssize_t lxc_read_file_expect(const char *path, void *buf, size_t count,
                             const void *expected_buf)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
 
        fd = open(path, O_RDONLY | O_CLOEXEC);
        if (fd < 0)
@@ -268,7 +268,7 @@ int lxc_count_file_lines(const char *fn)
 
 int lxc_make_tmpfile(char *template, bool rm)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        mode_t msk;
 
@@ -322,7 +322,7 @@ bool fhas_fs_type(int fd, fs_type_magic magic_val)
 
 FILE *fopen_cloexec(const char *path, const char *mode)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int open_mode = 0, step = 0;
        FILE *f;
 
@@ -430,7 +430,7 @@ static char *fd_to_buf(int fd, size_t *length)
 
 char *file_to_buf(const char *path, size_t *length)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
 
        if (!length)
                return NULL;
@@ -482,7 +482,7 @@ FILE *fdopen_cached(int fd, const char *mode, void **caller_freed_buffer)
 
 #else
 
-       __do_close_prot_errno int dupfd = -EBADF;
+       __do_close int dupfd = -EBADF;
 
        dupfd = dup(fd);
        if (dupfd < 0)
index 42e3b562f70a27e52a5651dcf7b896e848e136be..06a1eb9b610a9116471ccb7bcf7b1dcb244beeb7 100644 (file)
@@ -140,7 +140,7 @@ enum {
 
 static int ongoing_create(struct lxc_container *c)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        __do_free char *path = NULL;
        struct flock lk = {0};
        int ret;
@@ -1976,7 +1976,7 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
 
 static bool do_lxcapi_reboot(struct lxc_container *c)
 {
-       __do_close_prot_errno int pidfd = -EBADF;
+       __do_close int pidfd = -EBADF;
        pid_t pid = -1;
        int ret;
        int rebootsignal = SIGINT;
@@ -2012,7 +2012,7 @@ WRAP_API(bool, lxcapi_reboot)
 
 static bool do_lxcapi_reboot2(struct lxc_container *c, int timeout)
 {
-       __do_close_prot_errno int pidfd = -EBADF, state_client_fd = -EBADF;
+       __do_close int pidfd = -EBADF, state_client_fd = -EBADF;
        int rebootsignal = SIGINT;
        pid_t pid = -1;
        lxc_state_t states[MAX_STATE] = {0};
@@ -2081,7 +2081,7 @@ WRAP_API_1(bool, lxcapi_reboot2, int)
 
 static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout)
 {
-       __do_close_prot_errno int pidfd = -EBADF, state_client_fd = -EBADF;
+       __do_close int pidfd = -EBADF, state_client_fd = -EBADF;
        int haltsignal = SIGPWR;
        pid_t pid = -1;
        lxc_state_t states[MAX_STATE] = {0};
index 6758864fd69513e372847e8cf40431da1f665ab0..29878fb67dd0a8130df3dcb99cce9de02723f3ed 100644 (file)
@@ -33,7 +33,7 @@ static inline void close_prot_errno_disarm_function(int *fd)
 {
        close_prot_errno_disarm(*fd);
 }
-#define __do_close_prot_errno call_cleaner(close_prot_errno_disarm)
+#define __do_close call_cleaner(close_prot_errno_disarm)
 
 define_cleanup_function(FILE *, fclose);
 #define __do_fclose call_cleaner(fclose)
index 00b5f142e53da38f48c67eea32f969b8e1c080c6..c9c84b8c1a4c9e288f6dea64c89facc1ddb7f09f 100644 (file)
@@ -65,7 +65,7 @@ static int parse_argv(char ***argv)
 
 static int is_memfd(void)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int seals;
 
        fd = open("/proc/self/exe", O_RDONLY | O_CLOEXEC);
@@ -87,7 +87,7 @@ static int is_memfd(void)
 
 static void lxc_rexec_as_memfd(char **argv, char **envp, const char *memfd_name)
 {
-       __do_close_prot_errno int execfd = -EBADF, fd = -EBADF, memfd = -EBADF,
+       __do_close int execfd = -EBADF, fd = -EBADF, memfd = -EBADF,
                                  tmpfd = -EBADF;
        int ret;
        ssize_t bytes_sent = 0;
index 0c56ec5cafafd43105b67612a58cc6eeda0a0be2..6aedb5274d86e11e5e130cffdb2e64615cc60161 100644 (file)
@@ -1299,7 +1299,7 @@ void lxc_seccomp_free(struct lxc_seccomp *seccomp)
 #if HAVE_DECL_SECCOMP_NOTIFY_FD
 static int seccomp_notify_reconnect(struct lxc_handler *handler)
 {
-       __do_close_prot_errno int notify_fd = -EBADF;
+       __do_close int notify_fd = -EBADF;
 
        close_prot_errno_disarm(handler->conf->seccomp.notifier.proxy_fd);
 
@@ -1338,8 +1338,8 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
 {
 
 #if HAVE_DECL_SECCOMP_NOTIFY_FD
-       __do_close_prot_errno int fd_pid = -EBADF;
-       __do_close_prot_errno int fd_mem = -EBADF;
+       __do_close int fd_pid = -EBADF;
+       __do_close int fd_mem = -EBADF;
        int ret;
        ssize_t bytes;
        int send_fd_list[2];
@@ -1514,7 +1514,7 @@ int lxc_seccomp_setup_proxy(struct lxc_seccomp *seccomp,
 #if HAVE_DECL_SECCOMP_NOTIFY_FD
        if (seccomp->notifier.wants_supervision &&
            seccomp->notifier.proxy_addr.sun_path[1] != '\0') {
-               __do_close_prot_errno int notify_fd = -EBADF;
+               __do_close int notify_fd = -EBADF;
                int ret;
 
                notify_fd = lxc_unix_connect_type(&seccomp->notifier.proxy_addr,
index 2e6f8c6d420c7c47161dcc5d0c6ef7ba13263c83..75ccddd855934767bf33342ffe7d655faa33d0fc 100644 (file)
@@ -724,7 +724,7 @@ on_error:
 
 int lxc_init(const char *name, struct lxc_handler *handler)
 {
-       __do_close_prot_errno int status_fd = -EBADF;
+       __do_close int status_fd = -EBADF;
        int ret;
        const char *loglevel;
        struct lxc_conf *conf = handler->conf;
@@ -1053,9 +1053,9 @@ void lxc_abort(const char *name, struct lxc_handler *handler)
 static int do_start(void *data)
 {
        struct lxc_handler *handler = data;
-       __lxc_unused __do_close_prot_errno int data_sock0 = handler->data_sock[0],
+       __lxc_unused __do_close int data_sock0 = handler->data_sock[0],
                                           data_sock1 = handler->data_sock[1];
-       __do_close_prot_errno int status_fd = -EBADF;
+       __do_close int status_fd = -EBADF;
        int ret;
        uid_t new_uid;
        gid_t new_gid;
@@ -1557,7 +1557,7 @@ static inline int do_share_ns(void *arg)
  */
 static int lxc_spawn(struct lxc_handler *handler)
 {
-       __do_close_prot_errno int data_sock0 = -EBADF, data_sock1 = -EBADF;
+       __do_close int data_sock0 = -EBADF, data_sock1 = -EBADF;
        int i, ret;
        char pidstr[20];
        bool wants_to_map_ids;
index 26b2d50d7c5128f806fe48875e3028dd26b27b25..1b170cabe855c7f584b34370ac25d3ec06e45065 100644 (file)
@@ -94,7 +94,7 @@ int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
 
 struct lxc_terminal_state *lxc_terminal_signal_init(int srcfd, int dstfd)
 {
-       __do_close_prot_errno int signal_fd = -EBADF;
+       __do_close int signal_fd = -EBADF;
        __do_free struct lxc_terminal_state *ts = NULL;
        int ret;
        sigset_t mask;
index 7d996e3677cc30828dced64996d7942a8aaec3a4..a3b5f128f17c2b379eea0ed8e5b6d6c2f573675d 100644 (file)
@@ -635,7 +635,7 @@ int detect_shared_rootfs(void)
 
 bool switch_to_ns(pid_t pid, const char *ns)
 {
-       __do_close_prot_errno int fd = -EBADF;
+       __do_close int fd = -EBADF;
        int ret;
        char nspath[STRLITERALLEN("/proc//ns/")
                    + INTTYPE_TO_STRLEN(pid_t)
@@ -1642,7 +1642,7 @@ uint64_t lxc_find_next_power2(uint64_t n)
 
 static int process_dead(/* takes */ int status_fd)
 {
-       __do_close_prot_errno int dupfd = -EBADF;
+       __do_close int dupfd = -EBADF;
        __do_free char *line = NULL;
        __do_fclose FILE *f = NULL;
        int ret = 0;
index fa96b1a042845e36817faa41dc1175043907dc2c..414a00341412285c8dd1caa5e12cd05351ff6dbb 100644 (file)
@@ -39,7 +39,7 @@ static lxc_id128_t make_v4_uuid(lxc_id128_t id)
 
 static int get_random_bytes(void *p, size_t n)
 {
-       __do_close_prot_errno int fd = -1;
+       __do_close int fd = -1;
        ssize_t bytes = 0;
 
        fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC | O_NOCTTY);