From 8a015f6ec969acd841529dbca037e9fc0e3046a4 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Tue, 30 May 2017 15:27:00 +0100 Subject: Perl_sv_vcatpvfn_flags: s/int/STRLEN/g There wee a few residual places that used int loop counters, e.g. to prepend N '0's to a number. Since the N's are of type STRLEN, make the loop counters STRLEN too. Its a bit academic since you're unlikely to have a number needing >2Gb worth of zero padding, but it makes things consistent and easier to audit. At this point I believe that any remaining usage of int / I32 / U32 in Perl_sv_vcatpvfn_flags() is legitimate. --- sv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index c6eb905d06..887f17244e 100644 --- a/sv.c +++ b/sv.c @@ -13268,8 +13268,8 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p p = SvEND(sv); if (esignlen && fill) { - int i; - for (i = 0; i < (int)esignlen; i++) + STRLEN i; + for (i = 0; i < esignlen; i++) *p++ = esignbuf[i]; } if (gap && !left) { @@ -13277,12 +13277,12 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p p += gap; } if (esignlen && !fill) { - int i; - for (i = 0; i < (int)esignlen; i++) + STRLEN i; + for (i = 0; i < esignlen; i++) *p++ = esignbuf[i]; } if (zeros) { - int i; + STRLEN i; for (i = zeros; i; i--) *p++ = '0'; } -- cgit v1.2.1