PERFORCE change 106138 for review

[ Available lists | Index of p4-projects | Month of Sep 2006 | Week of 15 Sep 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Warner Losh <imp@FreeBSD.org>
Date
15 Sep 2006 07:27:12
Subject
PERFORCE change 106138 for review
Message-ID
200609150727.k8F7RBYp042514@repoman.freebsd.org


[ Hide this part ]
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);
}




Elapsed time: 0.051 seconds