PERFORCE change 101419 for review
Warner Losh
imp at FreeBSD.org
Wed Jul 12 22:16:15 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101419
Change 101419 by imp at imp_lighthouse on 2006/07/12 22:15:41
optimize
Affected files ...
.. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/env_vars.c#6 edit
Differences ...
==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/env_vars.c#6 (text+ko) ====
@@ -106,23 +106,15 @@
void
LoadBootCommands(void)
{
- int index, j, size;
- char *cPtr;
+ int index, j;
+ char *cptr;
p_memset((char*)boot_commands, 0, sizeof(boot_commands));
-
- cPtr = &BootCommandSection;
-
- size = MAX_ENV_SIZE_BYTES;
-
- for (index = 0; (index < MAX_BOOT_COMMANDS) && size; ++index) {
- for (j = 0; (j < MAX_INPUT_SIZE) && size; ++j) {
- size--;
- boot_commands[index][j] = *cPtr++;
- if (!(boot_commands[index][j])) {
- break;
- }
- }
+ cptr = &BootCommandSection;
+ for (index = 0; *cptr; index++) {
+ for (j = 0; *cptr; j++)
+ boot_commands[index][j] = *cptr++;
+ cptr++;
}
}
More information about the p4-projects
mailing list