Skip to content

Commit

Permalink
cgroup: move assignement out of condition in cgroup_attach_proc()
Browse files Browse the repository at this point in the history
Gcc complains about this: "kernel/cgroup.c:2179:4: warning: suggest
parentheses around assignment used as truth value [-Wparentheses]"

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Dan Carpenter authored and Tejun Heo committed Jan 4, 2012
1 parent 7e3aa30 commit 305f3c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2175,9 +2175,12 @@ static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
oldcg = tc->task->cgroups;

/* if we don't already have it in the list get a new one */
if (!css_set_check_fetched(cgrp, tc->task, oldcg, &newcg_list))
if (retval = css_set_prefetch(cgrp, oldcg, &newcg_list))
if (!css_set_check_fetched(cgrp, tc->task, oldcg,
&newcg_list)) {
retval = css_set_prefetch(cgrp, oldcg, &newcg_list);
if (retval)
goto out_list_teardown;
}
}

/*
Expand Down

0 comments on commit 305f3c8

Please sign in to comment.