diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-09-26 02:33:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:49:05 -0400 |
commit | 91b165c0594ab78c64f26d26e3174e6dfd60ed9d (patch) | |
tree | 0730eefa9d4ce786f7f561e3b40700418d6d0970 /arch/um/sys-i386/ldt.c | |
parent | 13c06be399902c9ebda08e092edb1614bb4a3761 (diff) |
[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>
Diffstat (limited to 'arch/um/sys-i386/ldt.c')
-rw-r--r-- | arch/um/sys-i386/ldt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index fe0877b3509c..69971b78beaf 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c | |||
@@ -424,9 +424,8 @@ void ldt_get_host_info(void) | |||
424 | size++; | 424 | size++; |
425 | } | 425 | } |
426 | 426 | ||
427 | if(size < sizeof(dummy_list)/sizeof(dummy_list[0])) { | 427 | if(size < ARRAY_SIZE(dummy_list)) |
428 | host_ldt_entries = dummy_list; | 428 | host_ldt_entries = dummy_list; |
429 | } | ||
430 | else { | 429 | else { |
431 | size = (size + 1) * sizeof(dummy_list[0]); | 430 | size = (size + 1) * sizeof(dummy_list[0]); |
432 | host_ldt_entries = (short *)kmalloc(size, GFP_KERNEL); | 431 | host_ldt_entries = (short *)kmalloc(size, GFP_KERNEL); |