Skip to content

Commit

Permalink
Merge pull request #2833 from brauner/2019-02-09/bugfixes
Browse files Browse the repository at this point in the history
bugfixes
  • Loading branch information
brauner committed Feb 9, 2019
2 parents 884b37d + 6425271 commit f57860a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lxc/cgroups/cgfsng.c
Expand Up @@ -2193,7 +2193,7 @@ static int convert_devpath(const char *invalue, char *dest)
* A ' # comment' would be legal. Technically other text is not
* legal, we could check for that if we cared to.
*/
for (n_parts = 1, p = path; *p && n_parts < 3; p++) {
for (n_parts = 1, p = path; *p; p++) {
if (*p != ' ')
continue;
*p = '\0';
Expand Down
1 change: 1 addition & 0 deletions src/lxc/cmd/lxc_init.c
Expand Up @@ -432,6 +432,7 @@ int main(int argc, char *argv[])

if (my_args.quiet)
fprintf(stderr, "Failed to wait on child %d\n", pid);
ret = -1;
goto out;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lxc/commands.c
Expand Up @@ -317,7 +317,7 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
return ret;
}

if (stay_connected && ret > 0)
if (stay_connected)
cmd->rsp.ret = client_fd;

return ret;
Expand Down
8 changes: 4 additions & 4 deletions src/lxc/start.c
Expand Up @@ -1507,11 +1507,11 @@ int resolve_clone_flags(struct lxc_handler *handler)
struct lxc_conf *conf = handler->conf;

for (i = 0; i < LXC_NS_MAX; i++) {
if (conf->ns_keep > 0) {
if ((conf->ns_keep & ns_info[i].clone_flag) == 0)
if (conf->ns_keep) {
if (!(conf->ns_keep & ns_info[i].clone_flag))
handler->ns_clone_flags |= ns_info[i].clone_flag;
} else if (conf->ns_clone > 0) {
if ((conf->ns_clone & ns_info[i].clone_flag) > 0)
} else if (conf->ns_clone) {
if ((conf->ns_clone & ns_info[i].clone_flag))
handler->ns_clone_flags |= ns_info[i].clone_flag;
} else {
if (i == LXC_NS_USER && lxc_list_empty(&handler->conf->id_map))
Expand Down

0 comments on commit f57860a

Please sign in to comment.