summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-11-20 08:09:24 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-11-20 08:09:33 +0000
commit6e1684e332dff35992b6c71aab9b4958627263a6 (patch)
tree01a7781882bd69493f5e5e79c51f42e98f96dd95
parent968a59bfd0dd0b35aa82ac8fe86af65a5456baa7 (diff)
downloadzsh-6e1684e332dff35992b6c71aab9b4958627263a6.tar.gz
zsh-6e1684e332dff35992b6c71aab9b4958627263a6.tar.xz
zsh-6e1684e332dff35992b6c71aab9b4958627263a6.zip
unposted (after 39952): Restore C89 compatibility.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_params.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 01a9d2cf9..cdaa0c1fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-11-20  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* unposted (after 39952): Src/Zle/zle_params.c: Restore C89
+	compatibility.
+
 	* 39985: Doc/Zsh/params.yo: Document the [nyae] answers to the
 	spelling correction prompt, $SPROMPT.
 
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index 2400bfb00..cb8dac867 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -729,6 +729,7 @@ static void
 set_register(Param pm, char *value)
 {
     int n = 0;
+    Cutbuffer reg;
 
     if (!pm->node.nam || *pm->node.nam < 'a' || *pm->node.nam > 'z' ||
 	    pm->node.nam[1]) {
@@ -736,7 +737,7 @@ set_register(Param pm, char *value)
 	return;
     }
 
-    Cutbuffer reg = &vibuf[*pm->node.nam - 'a'];
+    reg = &vibuf[*pm->node.nam - 'a'];
     if (*value)
 	reg->buf = stringaszleline(value, 0, &n, NULL, NULL);
     reg->len = n;