diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-12-25 14:48:40 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-12-25 16:15:47 -0700 |
commit | 7672526d72683f04e4060f53ada725f9cc9c4f16 (patch) | |
tree | 45b20edd78d8f2d2274ec19a9f838ba114f22ecc | |
parent | 24579eec3367fac01c9608681d22012f67030694 (diff) | |
download | perl-smoke-me/khw-strstr.tar.gz |
instr() uses strstr()smoke-me/khw-strstr
-rw-r--r-- | util.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -435,6 +435,8 @@ Perl_instr(register const char *big, register const char *little) PERL_ARGS_ASSERT_INSTR; + return strstr((char*)big, (char*)little); + if (!little) return (char*)big; first = *little++; @@ -460,7 +462,8 @@ Perl_instr(register const char *big, register const char *little) return NULL; } -/* same as instr but allow embedded nulls */ +/* same as instr but allow embedded nulls. The end pointers point to 1 beyond + * the final character desired to be checked */ char * Perl_ninstr(const char *big, const char *bigend, const char *little, const char *lend) |