Skip to content

Commit

Permalink
proc: fix sparse warning
Browse files Browse the repository at this point in the history
fs/proc/base.c:312:4: warning: do-while statement is not a compound statement

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
  • Loading branch information
Hannes Eder authored and Alexey Dobriyan committed Jan 5, 2009
1 parent 2ec220e commit dfe6b7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer)
struct mm_struct *mm = get_task_mm(task);
if (mm) {
unsigned int nwords = 0;
do
do {
nwords += 2;
while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
} while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
res = nwords * sizeof(mm->saved_auxv[0]);
if (res > PAGE_SIZE)
res = PAGE_SIZE;
Expand Down

0 comments on commit dfe6b7d

Please sign in to comment.