Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2006 22:16:13 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 101419 for review
Message-ID:  <200607122216.k6CMGDdR099447@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101419

Change 101419 by imp@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++;
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607122216.k6CMGDdR099447>