summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2005-12-28 11:01:46 +0000
committerGisle Aas <gisle@activestate.com>2005-12-28 11:01:46 +0000
commit260d78c9ff623f5d456f7d39acc9715eec2a85f4 (patch)
treef24890ba5bc69c0cc950b3e1871e488a4b148dea /util.c
parentad07e1310bf8286a17223f4f5f7abcb6926d9c81 (diff)
downloadperl-260d78c9ff623f5d456f7d39acc9715eec2a85f4.tar.gz
Remove test for NUL ending in r?instr().
This test is actually harmful because we will search for any garbage found past the empty search string. Ref change 26509. p4raw-id: //depot/perl@26510
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index a88d988b9a..c082f5bc7b 100644
--- a/util.c
+++ b/util.c
@@ -356,7 +356,7 @@ Perl_ninstr(pTHX_ register const char *big, register const char *bigend, const c
register const I32 first = *little;
register const char * const littleend = lend;
- if (!first && little >= littleend)
+ if (little >= littleend)
return (char*)big;
if (bigend - big < littleend - little)
return Nullch;
@@ -388,7 +388,7 @@ Perl_rninstr(pTHX_ register const char *big, const char *bigend, const char *lit
register const I32 first = *little;
register const char * const littleend = lend;
- if (!first && little >= littleend)
+ if (little >= littleend)
return (char*)bigend;
bigbeg = big;
big = bigend - (littleend - little++);