about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-01-25 15:43:06 +0000
committerPeter Stephenson <pws@zsh.org>2016-01-25 15:43:06 +0000
commitbe32864e6ff6a872d63314b4baedbfbf2eed54bd (patch)
tree11678df935451381fb8e10f16ad865a83d4bdc88 /Src/utils.c
parent3c9185272d1af21cd976a548f932d7554a3bb533 (diff)
downloadzsh-be32864e6ff6a872d63314b4baedbfbf2eed54bd.tar.gz
zsh-be32864e6ff6a872d63314b4baedbfbf2eed54bd.tar.xz
zsh-be32864e6ff6a872d63314b4baedbfbf2eed54bd.zip
37776: Set errflag before calls to zwarning().
This avoids an attempt to call zerr() or zerrnam() recusrively.
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index fd0bab320..17ebfebf9 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -169,12 +169,12 @@ VA_DCL
 	    errflag |= ERRFLAG_ERROR;
 	return;
     }
+    errflag |= ERRFLAG_ERROR;
 
     VA_START(ap, fmt);
     VA_GET_ARG(ap, fmt, const char *);
     zwarning(NULL, fmt, ap);
     va_end(ap);
-    errflag |= ERRFLAG_ERROR;
 }
 
 /**/
@@ -188,13 +188,13 @@ VA_DCL
 
     if (errflag || noerrs)
 	return;
+    errflag |= ERRFLAG_ERROR;
 
     VA_START(ap, fmt);
     VA_GET_ARG(ap, cmd, const char *);
     VA_GET_ARG(ap, fmt, const char *);
     zwarning(cmd, fmt, ap);
     va_end(ap);
-    errflag |= ERRFLAG_ERROR;
 }
 
 /**/