From: Christian Brauner Date: Thu, 26 Aug 2021 11:38:07 +0000 (+0200) Subject: conf: remove unused variables X-Git-Tag: lxc-5.0.0~102^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ef1dbb17bbf0ee69abda48673a65f0eccc8ecfa;p=thirdparty%2Flxc.git conf: remove unused variables Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 12fc7fa26..8070a32b1 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -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"); diff --git a/src/lxc/conf.h b/src/lxc/conf.h index 0843c99ad..1449774e4 100644 --- a/src/lxc/conf.h +++ b/src/lxc/conf.h @@ -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); diff --git a/src/lxc/confile.c b/src/lxc/confile.c index d0b891d2d..6c05838a2 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -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; }