[PATCH] uml: Use ARRAY_SIZE more assiduously

There were a bunch of missed ARRAY_SIZE opportunities.

Also, some formatting fixes in the affected areas of code.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jeff Dike
2006-09-25 23:33:00 -07:00
committed by Linus Torvalds
parent 13c06be399
commit 91b165c059
11 changed files with 25 additions and 32 deletions

View File

@ -114,14 +114,14 @@ static void which_tmpdir(void)
}
while(1){
found = next(fd, buf, sizeof(buf) / sizeof(buf[0]), ' ');
found = next(fd, buf, ARRAY_SIZE(buf), ' ');
if(found != 1)
break;
if(!strncmp(buf, "/dev/shm", strlen("/dev/shm")))
goto found;
found = next(fd, buf, sizeof(buf) / sizeof(buf[0]), '\n');
found = next(fd, buf, ARRAY_SIZE(buf), '\n');
if(found != 1)
break;
}
@ -135,7 +135,7 @@ err:
return;
found:
found = next(fd, buf, sizeof(buf) / sizeof(buf[0]), ' ');
found = next(fd, buf, ARRAY_SIZE(buf), ' ');
if(found != 1)
goto err;