aboutsummaryrefslogtreecommitdiff
path: root/bin/sh
diff options
context:
space:
mode:
authorMartin Cracauer <cracauer@FreeBSD.org>1998-09-10 14:51:06 +0000
committerMartin Cracauer <cracauer@FreeBSD.org>1998-09-10 14:51:06 +0000
commite6ac45dde20ff0faaca01f303f9b446ce35f235e (patch)
treeff3acfc56dd7d203dcd2356114940130cf9152d4 /bin/sh
parentd30ada6d4b9aea7ec38ae3442ed4670fde4daa95 (diff)
downloadsrc-e6ac45dde20ff0faaca01f303f9b446ce35f235e.tar.gz
src-e6ac45dde20ff0faaca01f303f9b446ce35f235e.zip
Fix an inefficiency I introduced in my last commit.
Include "expand.h" vom memalloc.c to pull function declartion into scope
Notes
Notes: svn path=/head/; revision=39049
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/memalloc.c3
-rw-r--r--bin/sh/trap.c13
2 files changed, 6 insertions, 10 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c
index 64557dc8ed0a..b2fa2b497faf 100644
--- a/bin/sh/memalloc.c
+++ b/bin/sh/memalloc.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
#endif
static const char rcsid[] =
- "$Id: memalloc.c,v 1.9 1998/05/18 06:43:57 charnier Exp $";
+ "$Id: memalloc.c,v 1.10 1998/09/06 21:13:09 tegge Exp $";
#endif /* not lint */
#include "shell.h"
@@ -48,6 +48,7 @@ static const char rcsid[] =
#include "error.h"
#include "machdep.h"
#include "mystring.h"
+#include "expand.h"
#include <stdlib.h>
#include <unistd.h>
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index 9cb3d0b3550f..666284c51607 100644
--- a/bin/sh/trap.c
+++ b/bin/sh/trap.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95";
#endif
static const char rcsid[] =
- "$Id: trap.c,v 1.14 1998/08/25 09:33:34 cracauer Exp $";
+ "$Id: trap.c,v 1.15 1998/09/08 13:16:52 cracauer Exp $";
#endif /* not lint */
#include <signal.h>
@@ -347,7 +347,6 @@ void
onsig(signo)
int signo;
{
- int i;
#ifndef BSD
signal(signo, onsig);
@@ -368,13 +367,9 @@ onsig(signo)
* If a trap is set, we need to make sure it is executed even
* when a childs blocks all signals.
*/
- for (i = 0; i < NSIG; i++) {
- if (signo == i && trap[i] != NULL &&
- ! (trap[i][0] == ':' && trap[i][1] == '\0')) {
- breakwaitcmd = 1;
- break;
- }
- }
+ if (trap[signo] != NULL &&
+ ! (trap[signo][0] == ':' && trap[signo][1] == '\0'))
+ breakwaitcmd = 1;
}