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/os-Linux | |
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/os-Linux')
-rw-r--r-- | arch/um/os-Linux/mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 560c8063c77c..b170b4704dc4 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c | |||
@@ -114,14 +114,14 @@ static void which_tmpdir(void) | |||
114 | } | 114 | } |
115 | 115 | ||
116 | while(1){ | 116 | while(1){ |
117 | found = next(fd, buf, sizeof(buf) / sizeof(buf[0]), ' '); | 117 | found = next(fd, buf, ARRAY_SIZE(buf), ' '); |
118 | if(found != 1) | 118 | if(found != 1) |
119 | break; | 119 | break; |
120 | 120 | ||
121 | if(!strncmp(buf, "/dev/shm", strlen("/dev/shm"))) | 121 | if(!strncmp(buf, "/dev/shm", strlen("/dev/shm"))) |
122 | goto found; | 122 | goto found; |
123 | 123 | ||
124 | found = next(fd, buf, sizeof(buf) / sizeof(buf[0]), '\n'); | 124 | found = next(fd, buf, ARRAY_SIZE(buf), '\n'); |
125 | if(found != 1) | 125 | if(found != 1) |
126 | break; | 126 | break; |
127 | } | 127 | } |
@@ -135,7 +135,7 @@ err: | |||
135 | return; | 135 | return; |
136 | 136 | ||
137 | found: | 137 | found: |
138 | found = next(fd, buf, sizeof(buf) / sizeof(buf[0]), ' '); | 138 | found = next(fd, buf, ARRAY_SIZE(buf), ' '); |
139 | if(found != 1) | 139 | if(found != 1) |
140 | goto err; | 140 | goto err; |
141 | 141 | ||