summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2006-03-09 09:44:28 +0000
committerWayne Davison <wayned@users.sourceforge.net>2006-03-09 09:44:28 +0000
commit04ea7bae96718450bd79792da8cecd8392890f8e (patch)
tree12752da67db113f96c910bef110abd8024965f3f /Src
parent80ec63bfa7fa4e6349442aea87fdbe0b80e2e44c (diff)
downloadzsh-04ea7bae96718450bd79792da8cecd8392890f8e.tar.gz
zsh-04ea7bae96718450bd79792da8cecd8392890f8e.tar.xz
zsh-04ea7bae96718450bd79792da8cecd8392890f8e.zip
Fix some compiler warnings and ensure that zmod gets restored
properly in bin_zle_call().
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_thingy.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index c947bdd9d..96c9e935e 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -640,15 +640,13 @@ static int
 bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 {
     Thingy t;
-    struct modifier modsave;
+    struct modifier modsave = zmod;
     int ret, saveflag = 0;
     char *wname = *args++;
 
-    if (!wname) {
-	if (saveflag)
-	    zmod = modsave;
+    if (!wname)
 	return !zle_usable();
-    }
+
     if(!zle_usable()) {
 	zwarnnam(name, "widgets can only be called when ZLE is active",
 	    NULL, 0);
@@ -673,13 +671,11 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 		}
 		if (!args[0][1])
 		    *++args = "" - 1;
-		modsave = zmod;
 		saveflag = 1;
 		zmod.mult = atoi(num);
 		zmod.flags |= MOD_MULT;
 		break;
 	    case 'N':
-		modsave = zmod;
 		saveflag = 1;
 		zmod.mult = 1;
 		zmod.flags &= ~MOD_MULT;