about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-05-09 10:27:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-05-09 10:27:32 +0000
commitae4a0ab46cbd2c6db916b702f05436b492a72d4d (patch)
tree9523001e19141589fcf74aee696d325723c7f0a0
parentd89361739acdf07f0b0775c85f69abe89d57b600 (diff)
downloadzsh-ae4a0ab46cbd2c6db916b702f05436b492a72d4d.tar.gz
zsh-ae4a0ab46cbd2c6db916b702f05436b492a72d4d.tar.xz
zsh-ae4a0ab46cbd2c6db916b702f05436b492a72d4d.zip
29193: badly placed variable declaration
-rw-r--r--ChangeLog5
-rw-r--r--Src/text.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 42e9fbb5c..a3744c582 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-05-09  Peter Stephenson  <pws@csr.com>
 
+	* 29193: Src/text.c: fix variable declaration that was after
+	code.
+
 	* 29165: Src/builtin.c, Src/exec.c, Src/glob.c, Src/hashtable.c,
 	Src/init.c, Src/jobs.c, Src/loop.c, Src/params.c, Src/prompt.c,
 	Src/system.h, Src/utils.c, Src/Modules/files.c,
@@ -14624,5 +14627,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5284 $
+* $Revision: 1.5285 $
 *****************************************************
diff --git a/Src/text.c b/Src/text.c
index 749b5d3dc..669037a2d 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -893,13 +893,13 @@ getredirs(LinkList redirs)
 		    taddstr(f->here_terminator);
 		    taddpending(f->name, f->munged_here_terminator);
 		} else {
+		    int fnamelen, sav;
 		    taddstr(fstr[REDIR_HERESTR]);
 		    /*
 		     * Just a quick and dirty representation.
 		     * Remove a terminating newline, if any.
 		     */
-		    int fnamelen = strlen(f->name);
-		    int sav;
+		    fnamelen = strlen(f->name);
 		    if (fnamelen > 0 && f->name[fnamelen-1] == '\n') {
 			sav = 1;
 			f->name[fnamelen-1] = '\0';