summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-12-08 21:09:57 +0000
committerNicholas Clark <nick@ccl4.org>2006-12-08 21:09:57 +0000
commitd07077ccb1603dbe7825b6fa721a5e5e922b807e (patch)
tree4ae4d927437e6710d030f82ca5502aee34cea210 /util.c
parent2b09c5a862431f9c94739bfc685cb244ce050f6c (diff)
downloadperl-d07077ccb1603dbe7825b6fa721a5e5e922b807e.tar.gz
No need to upgrade if all we're going to do is return.
p4raw-id: //depot/perl@29486
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 114e6adfdf..3ba64e0e8d 100644
--- a/util.c
+++ b/util.c
@@ -490,9 +490,9 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
mg->mg_len++;
}
s = (U8*)SvPV_force_mutable(sv, len);
- SvUPGRADE(sv, SVt_PVBM);
if (len == 0) /* TAIL might be on a zero-length string. */
return;
+ SvUPGRADE(sv, SVt_PVBM);
if (len > 2) {
const unsigned char *sb;
const U8 mlen = (len>255) ? 255 : (U8)len;