From ae9242c86a1a566d98a2cff4df680f1fcd0ecc48 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 13 Nov 2012 17:54:01 -0600 Subject: [PATCH] switch use of #define with static char* Signed-off-by: Serge Hallyn --- src/lxc/conf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index f3c2334bf..8f1cba9c8 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1732,6 +1732,8 @@ static int setup_private_host_hw_addr(char *veth1) return 0; } +static char *default_rootfs_mount = LXCROOTFSMOUNT; + struct lxc_conf *lxc_conf_init(void) { struct lxc_conf *new; @@ -1750,7 +1752,7 @@ struct lxc_conf *lxc_conf_init(void) new->console.master = -1; new->console.slave = -1; new->console.name[0] = '\0'; - new->rootfs.mount = LXCROOTFSMOUNT; + new->rootfs.mount = default_rootfs_mount; lxc_list_init(&new->cgroup); lxc_list_init(&new->network); lxc_list_init(&new->mount_list); @@ -2576,7 +2578,7 @@ void lxc_conf_free(struct lxc_conf *conf) return; if (conf->console.path) free(conf->console.path); - if (conf->rootfs.mount != LXCROOTFSMOUNT) + if (conf->rootfs.mount != default_rootfs_mount) free(conf->rootfs.mount); lxc_clear_config_network(conf); #if HAVE_APPARMOR