diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:20:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:20:26 -0700 |
commit | f797d37ead9afc9b5586f02789819a8fb72a55fc (patch) | |
tree | 8278cc2cdb32d5aabfab919e79afe56774618b8d /arch/sparc/prom/bootstr_32.c | |
parent | 41341261aa1707b49f937ba2c20d1a0daa5afac3 (diff) | |
parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) | |
download | linux-f797d37ead9afc9b5586f02789819a8fb72a55fc.tar.bz2 |
Merge 3.10-rc7 into usb-next
We want the USB fixes and other good stuff in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sparc/prom/bootstr_32.c')
-rw-r--r-- | arch/sparc/prom/bootstr_32.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/sparc/prom/bootstr_32.c b/arch/sparc/prom/bootstr_32.c index f5ec32e0d419..d2b49d2365e7 100644 --- a/arch/sparc/prom/bootstr_32.c +++ b/arch/sparc/prom/bootstr_32.c @@ -23,23 +23,25 @@ prom_getbootargs(void) return barg_buf; } - switch(prom_vers) { + switch (prom_vers) { case PROM_V0: cp = barg_buf; /* Start from 1 and go over fd(0,0,0)kernel */ - for(iter = 1; iter < 8; iter++) { + for (iter = 1; iter < 8; iter++) { arg = (*(romvec->pv_v0bootargs))->argv[iter]; if (arg == NULL) break; - while(*arg != 0) { + while (*arg != 0) { /* Leave place for space and null. */ - if(cp >= barg_buf + BARG_LEN-2){ + if (cp >= barg_buf + BARG_LEN - 2) /* We might issue a warning here. */ break; - } *cp++ = *arg++; } *cp++ = ' '; + if (cp >= barg_buf + BARG_LEN - 1) + /* We might issue a warning here. */ + break; } *cp = 0; break; |