1
0
Fork 0

proc: fix sparse warning

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>
hifive-unleashed-5.1
Hannes Eder 2008-12-30 18:49:13 +03:00 committed by Alexey Dobriyan
parent 2ec220e27f
commit dfe6b7d940
1 changed files with 2 additions and 2 deletions

View File

@ -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;