| The Android Open Source Project | ef582bd | 2010-07-22 09:12:15 -0700 | [diff] [blame] | 1 | diff --git a/init/util.c b/init/util.c |
| 2 | index 4d98cc2..0667593 100755 | ||||
| 3 | --- a/init/util.c | ||||
| 4 | +++ b/init/util.c | ||||
| 5 | @@ -657,8 +657,9 @@ static void get_hardware_name(void) | ||||
| 6 | if (x) { | ||||
| 7 | x += 2; | ||||
| 8 | n = 0; | ||||
| 9 | - while (*x && !isspace(*x)) { | ||||
| 10 | - hardware[n++] = tolower(*x); | ||||
| 11 | + while (*x && *x != '\n') { | ||||
| 12 | + if (!isspace(*x)) | ||||
| 13 | + hardware[n++] = tolower(*x); | ||||
| 14 | x++; | ||||
| 15 | if (n == 31) break; | ||||
| 16 | } | ||||