mailing list of musl libc
 help / color / mirror / code / Atom feed
2b356f0aa7e53a8cc06da152cd1471ff3fe3240e blob 393 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "word.h"

/**
 * strlen - Word sized c standard strlen.
 * @s: Source
 */
size_t strlen(const char *s)
{
	const char *z = s;
	const size_t *w;

	for (; (uintptr_t)s % sizeof(size_t); s++)
		if (!*s) return s - z;

	for (w = (const size_t *)s; !word_has_zero(*w); w++);
	for (s = (const char *)w; *s; s++);

	return s - z;
}
debug log:

solving 2b356f0 ...
found 2b356f0 in https://inbox.vuxu.org/musl/1359936735-31915-3-git-send-email-nwmcsween@gmail.com/
found d6f8631 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 d6f8631d59dd1ba47334d955fc1fe6e94106dcf3	src/string/strlen.c

applying [1/1] https://inbox.vuxu.org/musl/1359936735-31915-3-git-send-email-nwmcsween@gmail.com/
diff --git a/src/string/strlen.c b/src/string/strlen.c
index d6f8631..2b356f0 100644

Checking patch src/string/strlen.c...
Applied patch src/string/strlen.c cleanly.

index at:
100644 2b356f0aa7e53a8cc06da152cd1471ff3fe3240e	src/string/strlen.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).