aboutsummaryrefslogtreecommitdiffstats
path: root/memmem.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--memmem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/memmem.c b/memmem.c
index 847c4f0..1c537d0 100644
--- a/memmem.c
+++ b/memmem.c
@@ -16,6 +16,7 @@ libsimple_memmem(const void *hay_, size_t hayn, const void *sub_, size_t subn)
if (subn == 1)
return memchr(hay, *sub, hayn);
+ /* TODO optimise */
for (end = &hay[hayn - subn + 1]; hay != end; hay++)
if (*hay == *sub && !memcmp(hay, sub, subn))
return REMOVE_CONST(hay, char *);