mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
39893: use arrdup_max() to show explicitly the difference in two code branches
no functional change
This commit is contained in:
parent
c238057ccc
commit
d676d1bf4b
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-11-10 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 39893: Src/params.c: use arrdup_max() to show explicitly the
|
||||
difference in two code branches; no functional change
|
||||
|
||||
2016-11-11 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 39874/0002 plus size=0 handling: Src/mem.c: zshcalloc: Remove
|
||||
|
|
|
@ -2293,10 +2293,9 @@ getarrvalue(Value v)
|
|||
|
||||
/* Null if 1) array too short, 2) index still negative */
|
||||
if (arrlen_lt(s, v->start) || v->start < 0) {
|
||||
s = arrdup(nular);
|
||||
s = arrdup_max(nular, 1);
|
||||
} else if (v->end <= v->start) {
|
||||
s = arrdup_max(s, 1);
|
||||
s[0] = NULL;
|
||||
s = arrdup_max(nular, 0);
|
||||
} else {
|
||||
/* Copy to a point before the end of the source array:
|
||||
* arrdup_max will copy at most v->end - v->start elements,
|
||||
|
|
Loading…
Reference in a new issue