Date: Fri, 15 Sep 2006 07:27:11 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 106138 for review Message-ID: <200609150727.k8F7RBYp042514@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106138 Change 106138 by imp@imp_lighthouse on 2006/09/15 07:27:04 reimplement strlen. Saves another 16 bytes (20 so far). Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#11 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#11 (text+ko) ==== @@ -50,10 +50,10 @@ int p_strlen(const char *buffer) { - int len = 0; - while (buffer[len]) - len++; - return (len); + const char *ptr = buffer; + while (*ptr++) + continue; + return (ptr - buffer); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609150727.k8F7RBYp042514>