diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-11-30 03:21:53 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-12-03 23:53:03 +0000 |
commit | 5ecf332e84fc296a37d3ad9ec35fe3495234cfc1 (patch) | |
tree | 1a873a2ae993438ad639a606fe7d75d53b9d4db7 /Src | |
parent | 07a300365f8365b0eba133b8f2bc9a877b30bee2 (diff) | |
download | zsh-5ecf332e84fc296a37d3ad9ec35fe3495234cfc1.tar.gz zsh-5ecf332e84fc296a37d3ad9ec35fe3495234cfc1.tar.xz zsh-5ecf332e84fc296a37d3ad9ec35fe3495234cfc1.zip |
37253: Constify two local variables.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/params.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Src/params.c b/Src/params.c index d8bf83d0e..142697f20 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2552,18 +2552,20 @@ setarrvalue(Value v, char **val) v->pm->node.nam); return; } else { - char **old, **new, **p, **q, **r; - int pre_assignment_length; + char **const old = v->pm->gsu.a->getfn(v->pm); + char **new; + char **p, **q, **r; /* index variables */ + const int pre_assignment_length = arrlen(old); int post_assignment_length; int i; + q = old; + if ((v->flags & VALFLAG_INV) && unset(KSHARRAYS)) { if (v->start > 0) v->start--; v->end--; } - q = old = v->pm->gsu.a->getfn(v->pm); - pre_assignment_length = arrlen(old); if (v->start < 0) { v->start += pre_assignment_length; if (v->start < 0) |