Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh Revert previous, change has nothing to do with DEBUG ...



details:   https://anonhg.NetBSD.org/src/rev/19c7b612b836
branches:  trunk
changeset: 324241:19c7b612b836
user:      kre <kre%NetBSD.org@localhost>
date:      Sun Jul 22 20:42:50 2018 +0000

description:
Revert previous, change has nothing to do with DEBUG mode.
COming again (correctly) in a few seconds.

diffstat:

 bin/sh/trap.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (33 lines):

diff -r d5b21e07200c -r 19c7b612b836 bin/sh/trap.c
--- a/bin/sh/trap.c     Sun Jul 22 20:38:06 2018 +0000
+++ b/bin/sh/trap.c     Sun Jul 22 20:42:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.42 2018/07/22 20:38:06 kre Exp $    */
+/*     $NetBSD: trap.c,v 1.43 2018/07/22 20:42:50 kre Exp $    */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)trap.c     8.5 (Berkeley) 6/5/95";
 #else
-__RCSID("$NetBSD: trap.c,v 1.42 2018/07/22 20:38:06 kre Exp $");
+__RCSID("$NetBSD: trap.c,v 1.43 2018/07/22 20:42:50 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -523,11 +523,9 @@
                savestatus=exitstatus;
                CTRACE(DBG_TRAP|DBG_SIG, ("dotrap %d: \"%s\"\n", i,
                    trap[i] ? trap[i] : "-NULL-"));
-               if ((tr = trap[i]) != NULL) {
-                       tr = savestr(tr);       /* trap code may free trap[i] */
-                       evalstring(tr, 0);
-                       ckfree(tr);
-               }
+               tr = savestr(trap[i]);          /* trap code may free trap[i] */
+               evalstring(tr, 0);
+               ckfree(tr);
                exitstatus=savestatus;
        }
 }



Home | Main Index | Thread Index | Old Index