[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:
committed by
Linus Torvalds
parent
13c06be399
commit
91b165c059
@@ -544,7 +544,7 @@ static struct chan *parse_chan(struct line *line, char *str, int device,
|
||||
|
||||
ops = NULL;
|
||||
data = NULL;
|
||||
for(i = 0; i < sizeof(chan_table)/sizeof(chan_table[0]); i++){
|
||||
for(i = 0; i < ARRAY_SIZE(chan_table); i++){
|
||||
entry = &chan_table[i];
|
||||
if(!strncmp(str, entry->key, strlen(entry->key))){
|
||||
ops = entry->ops;
|
||||
|
Reference in New Issue
Block a user