about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-12-17 09:41:08 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-12-17 09:41:08 +0000
commit2fe664de462b14e1b7aa96d9a49dc8be32556576 (patch)
treed7dada5b355a80d5a1bb6c7a209de2cb4caecb00
parent6176062298c7efcebaf5458c63a125de93294bc9 (diff)
downloadzsh-2fe664de462b14e1b7aa96d9a49dc8be32556576.tar.gz
zsh-2fe664de462b14e1b7aa96d9a49dc8be32556576.tar.xz
zsh-2fe664de462b14e1b7aa96d9a49dc8be32556576.zip
Wayne: 24273: curses macros dont return a value
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/curses.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5eb988215..89970766f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-17  Peter Stephenson  <pws@csr.com>
+
+	* Wayne: 24273: Src/Modules/curses.c: various macros
+	aren't supposed to return a value.
+
 2007-12-16  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 24271: Src/lex.c, Test/C01arith.ztst: handle parse failures
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index 4f5cbd80b..0649f5750 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -1329,9 +1329,14 @@ zccmd_position(const char *nam, char **args)
     w = (ZCWin)getdata(node);
 
     /* Look no pointers:  these are macros. */
-    if (getyx(w->win, intarr[0], intarr[1]) == ERR ||
-	getbegyx(w->win, intarr[2], intarr[3]) == ERR ||
-	getmaxyx(w->win, intarr[4], intarr[5]) == ERR)
+    getyx(w->win, intarr[0], intarr[1]);
+    if (intarr[0] == -1)
+	return 1;
+    getbegyx(w->win, intarr[2], intarr[3]);
+    if (intarr[2] == -1)
+	return 1;
+    getmaxyx(w->win, intarr[4], intarr[5]);
+    if (intarr[4] == -1)
 	return 1;
 
     array = (char **)zalloc(7*sizeof(char *));