Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 01/17: emulate: Handle aborting from mixed -L/-c correctly
- X-seq: zsh-workers 34114
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH 01/17: emulate: Handle aborting from mixed -L/-c correctly
- Date: Tue, 6 Jan 2015 06:25:33 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=47uXmmJPOtUrOISs17eP3OxXPUDE6G8s41433jen3Rs=; b=T8f/RtmncBJwp26sp4V1wexsXn6UVrCVXo/Y3O2u2v/koHTJzlg7ZouHNiwONq+0+B t2m/g0QZe3tbSapssqnruzG9irDOb/5GMEi0Qaqk8ch+sj+GM+f/xHghsPK7y9fd2gJF Z6nrHnmQyk4b0z/nWNXA74II6ie77qO1GZ2gBQo8rPpQz/h4gFIJjIuq7zlQS4fwzlgh 7zSnFfcx9uLzD0YphDvn5G1TmqX8N1z6wplQUtstqcXPMxeXadIngEh4ELlrqZQru7SK lGDWG0vQxdp7dtneaYFl5t863JDNsLF+Qo+jl4WBlKf3Oq3cx4GgTJauREUvIBLCmIdO GkzQ==
- In-reply-to: <1420521949-30483-1-git-send-email-mikachu@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1420521949-30483-1-git-send-email-mikachu@gmail.com>
Somehow Coverity found this (Issue 1255797, Failure to restore non-local value).
---
Src/builtin.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Src/builtin.c b/Src/builtin.c
index ebc0654..2b9c4de 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5171,7 +5171,7 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
if (cmd) {
if (opt_L) {
zwarnnam("emulate", "option -L incompatible with -c");
- goto restore;
+ goto restore2;
}
*--argv = cmd; /* on stack, never free()d, see execbuiltin() */
} else
@@ -5209,6 +5209,7 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
}
ret = eval(argv);
sticky = save_sticky;
+restore2:
emulation = saveemulation;
memcpy(opts, saveopts, sizeof(opts));
restorepatterndisables(savepatterns);
--
2.2.0.GIT
Messages sorted by:
Reverse Date,
Date,
Thread,
Author