about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-07-30 10:50:48 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-08-01 08:01:29 +0000
commitf9b170351136e7e2e04cecf4f1f6c686b0c1324d (patch)
tree46e9e0fe3196981ca8dd12e47d25ebf0908b10d3 /Src/Modules
parent1a368bf31f2b2e6e96290a4803bdcd81e9f17393 (diff)
downloadzsh-f9b170351136e7e2e04cecf4f1f6c686b0c1324d.tar.gz
zsh-f9b170351136e7e2e04cecf4f1f6c686b0c1324d.tar.xz
zsh-f9b170351136e7e2e04cecf4f1f6c686b0c1324d.zip
38971: Start using the new arrlen_ge() / arrlen_le() helpers.
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/terminfo.c2
-rw-r--r--Src/Modules/zutil.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c
index e0439afca..bbd325899 100644
--- a/Src/Modules/terminfo.c
+++ b/Src/Modules/terminfo.c
@@ -99,7 +99,7 @@ bin_echoti(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
 	return 1;
     }
     /* check that the number of arguments provided is not too high */
-    if (arrlen(argv) > 9) {
+    if (arrlen_gt(argv, 9)) {
         zwarnnam(name, "too many arguments");
         return 1;
     }
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index 477575ccd..d95c0c254 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -472,7 +472,7 @@ bin_zstyle(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
 	Patprog prog;
 	char *pat;
 
-	if (arrlen(args) < 2) {
+	if (arrlen_lt(args, 2)) {
 	    zwarnnam(nam, "not enough arguments");
 	    return 1;
 	}
@@ -491,7 +491,7 @@ bin_zstyle(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
 	Style s;
 	char *context, *stylename;
 
-	switch (arrlen(args)) {
+	switch (arrlen_ge(args, 3) ? 3 : arrlen(args)) {
 	case 2:
 	    context = args[0];
 	    stylename = args[1];