about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 2adecbe21..145cb8cad 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5012,7 +5012,7 @@ bin_trap(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
 		    s = getpermtext(sigfuncs[sig], NULL);
 		    printf("trap -- ");
 		    quotedzputs(s, stdout);
-		    printf(" %s\n", name);
+		    printf(" %s\n", sigs[sig]);
 		    zsfree(s);
 		}
 	    }
@@ -5052,23 +5052,12 @@ bin_trap(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
     /* set traps */
     for (; *argv; argv++) {
 	Eprog t;
-	int flags;
 
 	sig = getsignum(*argv);
 	if (sig == -1) {
 	    zwarnnam(name, "undefined signal: %s", *argv, 0);
 	    break;
 	}
-	if (!strcmp(sigs[sig], *argv))
-	    flags = 0;
-	else {
-	    /*
-	     * Record that the signal is used under an assumed name.
-	     * If we ever have more than one alias per signal this
-	     * will need improving.
-	     */
-	    flags = ZSIG_ALIAS;
-	}
 	t = dupeprog(prog, 0);
 	if (settrap(sig, t))
 	    freeeprog(t);