diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-07-30 10:50:48 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-08-01 08:01:29 +0000 |
commit | f9b170351136e7e2e04cecf4f1f6c686b0c1324d (patch) | |
tree | 46e9e0fe3196981ca8dd12e47d25ebf0908b10d3 /Src/builtin.c | |
parent | 1a368bf31f2b2e6e96290a4803bdcd81e9f17393 (diff) | |
download | zsh-f9b170351136e7e2e04cecf4f1f6c686b0c1324d.tar.gz zsh-f9b170351136e7e2e04cecf4f1f6c686b0c1324d.tar.xz zsh-f9b170351136e7e2e04cecf4f1f6c686b0c1324d.zip |
38971: Start using the new arrlen_ge() / arrlen_le() helpers.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index bfb9e6929..fb14b2e33 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3406,7 +3406,7 @@ bin_unset(char *name, char **argv, Options ops, int func) } else { /* start is after the element for reverse index */ int start = vbuf.start - !!(vbuf.flags & VALFLAG_INV); - if (start < arrlen(vbuf.pm->u.arr)) { + if (arrlen_gt(vbuf.pm->u.arr, start)) { char *arr[2]; arr[0] = ""; arr[1] = 0; @@ -5026,7 +5026,7 @@ bin_shift(char *name, char **argv, Options ops, UNUSED(int func)) if (*argv) { for (; *argv; argv++) if ((s = getaparam(*argv))) { - if (num > arrlen(s)) { + if (arrlen_lt(s, num)) { zwarnnam(name, "shift count must be <= $#"); ret++; continue; @@ -5095,7 +5095,7 @@ bin_getopts(UNUSED(char *name), char **argv, UNUSED(Options ops), UNUSED(int fun zoptind = 1; optcind = 0; } - if(zoptind > arrlen(args)) + if (arrlen_lt(args, zoptind)) /* no more options */ return 1; |