From owner-p4-projects@FreeBSD.ORG Fri Sep 15 07:38:27 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 74DF616A47E; Fri, 15 Sep 2006 07:38:27 +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 3805D16A47B for ; Fri, 15 Sep 2006 07:38:27 +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 C4DA343D49 for ; Fri, 15 Sep 2006 07:38:26 +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 k8F7cQQf043282 for ; Fri, 15 Sep 2006 07:38:26 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8F7cQKG043279 for perforce@freebsd.org; Fri, 15 Sep 2006 07:38:26 GMT (envelope-from imp@freebsd.org) Date: Fri, 15 Sep 2006 07:38:26 GMT Message-Id: <200609150738.k8F7cQKG043279@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 106140 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: Fri, 15 Sep 2006 07:38:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=106140 Change 106140 by imp@imp_lighthouse on 2006/09/15 07:37:25 Break p_strlen out of p_string to save another 24 bytes per boot loader (except bootiic). Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#21 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#12 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/strlen.c#1 add Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#21 (text+ko) ==== @@ -6,7 +6,7 @@ INTERNALLIB= SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c fpga.c getc.c \ p_string.c putchar.c printf.c reset.c spi_flash.c xmodem.c \ - sd-card.c mci_device.c strcvt.c + sd-card.c mci_device.c strcvt.c strlen.c SRCS+=ashldi3.c divsi3.S NO_MAN= ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#12 (text+ko) ==== @@ -39,24 +39,6 @@ *buffer++ = value; } - -/* - * .KB_C_FN_DEFINITION_START - * int p_strlen(char *) - * This global function returns the number of bytes starting at the pointer - * before (not including) the string termination character ('/0'). - * .KB_C_FN_DEFINITION_END - */ -int -p_strlen(const char *buffer) -{ - const char *ptr = buffer; - while (*ptr++) - continue; - return (ptr - buffer); -} - - /* * .KB_C_FN_DEFINITION_START * char *p_strcpy(char *to, char *from)