1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

39874/0001: setarrvalue: Remove needless initialization.

This commit is contained in:
Daniel Shahaf 2016-11-08 15:46:40 +00:00
parent 5f1700755f
commit 7139b73724
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2016-11-11 Daniel Shahaf <d.s@daniel.shahaf.name>
* 39874/0001: Src/params.c: setarrvalue: Remove needless
initialization.
2016-11-10 Peter Stephenson <p.stephenson@samsung.com>
* 39901: Src/exec.c, Test/C03traps.ztst: Exiting the left hand

View file

@ -2657,8 +2657,8 @@ setarrvalue(Value v, char **val)
if (v->end <= pre_assignment_length)
post_assignment_length += pre_assignment_length - v->end + 1;
p = new = (char **) zshcalloc(sizeof(char *)
* (post_assignment_length + 1));
p = new = (char **) zalloc(sizeof(char *)
* (post_assignment_length + 1));
for (i = 0; i < v->start; i++)
*p++ = i < pre_assignment_length ? ztrdup(*q++) : ztrdup("");