summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-04 20:47:34 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-04 20:47:34 +0000
commit86c11942206ec09dd2a486bb22552aa2f170e322 (patch)
treeda93ee724d8086efae3d2841ff113c9bcaa813f9 /regcomp.c
parentca563b4e7524b82fcbffcbe3344a4a9d20a7ab64 (diff)
downloadperl-86c11942206ec09dd2a486bb22552aa2f170e322.tar.gz
Use the return value from sprintf().
p4raw-id: //depot/perl@26001
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index d86083160a..d288eb0450 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6218,8 +6218,8 @@ Perl_save_re_context(pTHX)
for (i = 1; i <= rx->nparens; i++) {
GV *mgv;
char digits[TYPE_CHARS(long)];
- sprintf(digits, "%lu", (long)i);
- if ((mgv = gv_fetchpv(digits, FALSE, SVt_PV)))
+ const STRLEN len = sprintf(digits, "%lu", (long)i);
+ if ((mgv = gv_fetchpvn_flags(digits, len, FALSE, SVt_PV)))
save_scalar(mgv);
}
}