mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 17:10:59 +01:00
39943: no need to compute arrlen() in arrdup_max() when max == 0.
This commit is contained in:
parent
921b39ac6b
commit
98b7960c78
2 changed files with 8 additions and 2 deletions
|
|
@ -4252,9 +4252,10 @@ mod_export char **
|
|||
arrdup_max(char **s, unsigned max)
|
||||
{
|
||||
char **x, **y, **send;
|
||||
int len;
|
||||
int len = 0;
|
||||
|
||||
len = arrlen(s);
|
||||
if (max)
|
||||
len = arrlen(s);
|
||||
|
||||
/* Limit has sense only if not equal to len */
|
||||
if (max > len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue