aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-02-08 14:39:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-02-08 14:39:42 -0200
commit74f1c3d025c6d8a714454470a953f383a1c6a641 (patch)
treecc89dfa109c64ed928217d777959ffc7ace12501 /lstrlib.c
parent1f691a4fcd32b706c79e4c8cbff17c6ae985bc34 (diff)
downloadlua-74f1c3d025c6d8a714454470a953f383a1c6a641.tar.gz
lua-74f1c3d025c6d8a714454470a953f383a1c6a641.tar.bz2
lua-74f1c3d025c6d8a714454470a953f383a1c6a641.zip
small changes for "clean C"
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstrlib.c b/lstrlib.c
index c724d076..713cc72e 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.38 1999/11/22 17:39:51 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.39 1999/12/27 17:33:22 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -382,7 +382,7 @@ static const char *memfind (const char *s1, long l1, const char *s2, long l2) {
382 const char *init; /* to search for a `*s2' inside `s1' */ 382 const char *init; /* to search for a `*s2' inside `s1' */
383 l2--; /* 1st char will be checked by `memchr' */ 383 l2--; /* 1st char will be checked by `memchr' */
384 l1 = l1-l2; /* `s2' cannot be found after that */ 384 l1 = l1-l2; /* `s2' cannot be found after that */
385 while (l1 > 0 && (init = memchr(s1, *s2, l1)) != NULL) { 385 while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) {
386 init++; /* 1st char is already checked */ 386 init++; /* 1st char is already checked */
387 if (memcmp(init, s2+1, l2) == 0) 387 if (memcmp(init, s2+1, l2) == 0)
388 return init-1; 388 return init-1;