| Submitter | Chen Gang |
|---|---|
| Date | Nov. 13, 2012, 5:29 a.m. |
| Message ID | <50A1DAD3.40305@asianux.com> |
| Download | mbox | patch |
| Permalink | /patch/198547/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
Patch
diff --git a/arch/sparc/prom/bootstr_32.c b/arch/sparc/prom/bootstr_32.c index f5ec32e..4ce602f 100644 --- a/arch/sparc/prom/bootstr_32.c +++ b/arch/sparc/prom/bootstr_32.c @@ -31,14 +31,10 @@ prom_getbootargs(void) arg = (*(romvec->pv_v0bootargs))->argv[iter]; if (arg == NULL) break; - while(*arg != 0) { - /* Leave place for space and null. */ - if(cp >= barg_buf + BARG_LEN-2){ - /* We might issue a warning here. */ - break; - } + while (*arg != 0 && cp < (barg_buf + BARG_LEN - 2)) *cp++ = *arg++; - } + + /* Append trailing space + null */ *cp++ = ' '; } *cp = 0;