conf: coding style fixes

parent e25af1bc
...@@ -597,7 +597,7 @@ static int add_shmount_to_list(struct lxc_conf *conf) ...@@ -597,7 +597,7 @@ static int add_shmount_to_list(struct lxc_conf *conf)
static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_handler *handler) static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_handler *handler)
{ {
int i, r; int i, ret;
static struct { static struct {
int match_mask; int match_mask;
int match_flag; int match_flag;
...@@ -672,18 +672,18 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha ...@@ -672,18 +672,18 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
mflags = add_required_remount_flags(source, destination, mflags = add_required_remount_flags(source, destination,
default_mounts[i].flags); default_mounts[i].flags);
r = safe_mount(source, destination, default_mounts[i].fstype, ret = safe_mount(source, destination, default_mounts[i].fstype,
mflags, default_mounts[i].options, mflags, default_mounts[i].options,
rootfs->path ? rootfs->mount : NULL); rootfs->path ? rootfs->mount : NULL);
saved_errno = errno; saved_errno = errno;
if (r < 0 && errno == ENOENT) { if (ret < 0 && errno == ENOENT) {
INFO("Mount source or target for \"%s\" on \"%s\" does not exist. Skipping", source, destination); INFO("Mount source or target for \"%s\" on \"%s\" does not exist. Skipping", source, destination);
r = 0; ret = 0;
} else if (r < 0) { } else if (ret < 0) {
SYSERROR("Failed to mount \"%s\" on \"%s\" with flags %lu", source, destination, mflags); SYSERROR("Failed to mount \"%s\" on \"%s\" with flags %lu", source, destination, mflags);
} }
if (r < 0) { if (ret < 0) {
errno = saved_errno; errno = saved_errno;
return -1; return -1;
} }
...@@ -728,7 +728,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha ...@@ -728,7 +728,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
} }
if (flags & LXC_AUTO_SHMOUNTS_MASK) { if (flags & LXC_AUTO_SHMOUNTS_MASK) {
int ret = add_shmount_to_list(conf); ret = add_shmount_to_list(conf);
if (ret < 0) if (ret < 0)
return log_error(-1, "Failed to add shmount entry to container config"); return log_error(-1, "Failed to add shmount entry to container config");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment