]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: remove unused variables
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 26 Aug 2021 11:38:07 +0000 (13:38 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 26 Aug 2021 11:38:07 +0000 (13:38 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c

index 12fc7fa261ab0dbd1f74ce7e50f35413e7e871ec..8070a32b18824816a50767371ef86367d2611fb0 100644 (file)
@@ -3390,8 +3390,6 @@ struct lxc_conf *lxc_conf_init(void)
        INIT_LIST_HEAD(&new->id_map);
        new->root_nsuid_map = NULL;
        new->root_nsgid_map = NULL;
-       lxc_list_init(&new->includes);
-       lxc_list_init(&new->aliens);
        lxc_list_init(&new->environment);
        INIT_LIST_HEAD(&new->limits);
        INIT_LIST_HEAD(&new->sysctls);
@@ -4743,32 +4741,6 @@ int lxc_clear_hooks(struct lxc_conf *c, const char *key)
        return 0;
 }
 
-static inline void lxc_clear_aliens(struct lxc_conf *conf)
-{
-       struct lxc_list *it, *next;
-
-       lxc_list_for_each_safe (it, &conf->aliens, next) {
-               lxc_list_del(it);
-               free(it->elem);
-               free(it);
-       }
-
-       lxc_list_init(&conf->aliens);
-}
-
-void lxc_clear_includes(struct lxc_conf *conf)
-{
-       struct lxc_list *it, *next;
-
-       lxc_list_for_each_safe(it, &conf->includes, next) {
-               lxc_list_del(it);
-               free(it->elem);
-               free(it);
-       }
-
-       lxc_list_init(&conf->includes);
-}
-
 int lxc_clear_apparmor_raw(struct lxc_conf *c)
 {
        struct lxc_list *it, *next;
@@ -4824,8 +4796,6 @@ void lxc_conf_free(struct lxc_conf *conf)
        lxc_clear_mount_entries(conf);
        lxc_clear_idmaps(conf);
        lxc_clear_groups(conf);
-       lxc_clear_includes(conf);
-       lxc_clear_aliens(conf);
        lxc_clear_environment(conf);
        lxc_clear_limits(conf, "lxc.prlimit");
        lxc_clear_sysctls(conf, "lxc.sysctl");
index 0843c99ad89f17a1d199af760e5d3527d5c2ef71..1449774e473dc33f0f704e7707b81ba97d103dd2 100644 (file)
@@ -436,11 +436,6 @@ struct lxc_conf {
        unsigned int monitor_unshare;
        unsigned int monitor_signal_pdeath;
 
-       /* list of included files */
-       struct lxc_list includes;
-       /* config entries which are not "lxc.*" are aliens */
-       struct lxc_list aliens;
-
        /* list of environment variables we'll add to the container when
         * started */
        struct lxc_list environment;
@@ -540,7 +535,6 @@ __hidden extern int lxc_clear_environment(struct lxc_conf *c);
 __hidden extern int lxc_clear_limits(struct lxc_conf *c, const char *key);
 __hidden extern int lxc_delete_autodev(struct lxc_handler *handler);
 __hidden extern int lxc_clear_autodev_tmpfs_size(struct lxc_conf *c);
-__hidden extern void lxc_clear_includes(struct lxc_conf *conf);
 __hidden extern int lxc_setup_rootfs_prepare_root(struct lxc_conf *conf, const char *name,
                                                  const char *lxcpath);
 __hidden extern int lxc_setup(struct lxc_handler *handler);
index d0b891d2dd906a2e9819dee0776a5feeb71bba09..6c05838a28d83fb788b42a52f8ac751062ddef6e 100644 (file)
@@ -5257,7 +5257,6 @@ static inline int clr_config_proc(const char *key, struct lxc_conf *c,
 static inline int clr_config_includefiles(const char *key, struct lxc_conf *c,
                                          void *data)
 {
-       lxc_clear_includes(c);
        return 0;
 }