diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2013-03-20 21:05:01 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2013-03-20 21:05:01 +0000 |
commit | 88aa824b77244ed6b16a1f83a769df13bc483014 (patch) | |
tree | 6eaae8c37de3a5f2602f9a4b807f8e5bf1b08965 /bin/ksh | |
parent | 38925003d7e8590065fb1f65eb646fb6a34c8fd6 (diff) |
Remove bogus #if 0'd code. As the comment says, POSIX doesn't need this.
OK martynas@
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/c_sh.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index 11090a96493..bafe13e6c35 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_sh.c,v 1.41 2010/03/27 09:10:01 jmc Exp $ */ +/* $OpenBSD: c_sh.c,v 1.42 2013/03/20 21:05:00 millert Exp $ */ /* * built-in Bourne commands @@ -465,29 +465,13 @@ c_trap(char **wp) wp += builtin_opt.optind; if (*wp == NULL) { - int anydfl = 0; - for (p = sigtraps, i = NSIG+1; --i >= 0; p++) { - if (p->trap == NULL) - anydfl = 1; - else { + if (p->trap != NULL) { shprintf("trap -- "); print_value_quoted(p->trap); shprintf(" %s\n", p->name); } } -#if 0 /* this is ugly and not clear POSIX needs it */ - /* POSIX may need this so output of trap can be saved and - * used to restore trap conditions - */ - if (anydfl) { - shprintf("trap -- -"); - for (p = sigtraps, i = NSIG+1; --i >= 0; p++) - if (p->trap == NULL && p->name) - shprintf(" %s", p->name); - shprintf(newline); - } -#endif return 0; } |