From owner-p4-projects@FreeBSD.ORG Wed Jul 12 22:16:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E9B2D16A53A; Wed, 12 Jul 2006 22:16:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C788216A501 for ; Wed, 12 Jul 2006 22:16:13 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83B0543D5E for ; Wed, 12 Jul 2006 22:16:13 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6CMGD3Q099450 for ; Wed, 12 Jul 2006 22:16:13 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6CMGDdR099447 for perforce@freebsd.org; Wed, 12 Jul 2006 22:16:13 GMT (envelope-from imp@freebsd.org) Date: Wed, 12 Jul 2006 22:16:13 GMT Message-Id: <200607122216.k6CMGDdR099447@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 101419 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2006 22:16:15 -0000 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++; } }