summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2019-11-08 10:17:50 -0500
committerJames E Keenan <jkeenan@cpan.org>2019-11-12 19:50:59 +0000
commit35bc1e35279523a59fee1761d7505ff5c04638c0 (patch)
tree2f4a788c40bd59c3c28fc2e2ef6fc646db67cb9a /utf8.c
parentecfd8588da8b6d2b74d6476d4d1c9e40c7de8b8c (diff)
downloadperl-35bc1e35279523a59fee1761d7505ff5c04638c0.tar.gz
Fix: local variable hiding parameter of same name
LGTM provides static code analysis and recommendations for code quality improvements. Their recent run over the Perl 5 core distribution identified 12 instances where a local variable hid a parameter of the same name in an outer scope. The LGTM rule governing this situation can be found here: Per: https://lgtm.com/rules/2156240606/ This patch renames local variables in approximately 8 of those instances to comply with the LGTM recommendation. Suggestions for renamed variables were made by Tony Cook. For: https://github.com/Perl/perl5/pull/17281
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 15940392a0..2aeb0faee6 100644
--- a/utf8.c
+++ b/utf8.c
@@ -3884,8 +3884,8 @@ Perl__to_utf8_fold_flags(pTHX_ const U8 *p,
/* Look at every character in the result; if any cross the
* boundary, the whole thing is disallowed */
U8* s = ustrp;
- U8* e = ustrp + *lenp;
- while (s < e) {
+ U8* send = ustrp + *lenp;
+ while (s < send) {
if (isASCII(*s)) {
/* Crossed, have to return the original */
original = valid_utf8_to_uvchr(p, lenp);