aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPiotr Pawel Stefaniak <pstef@FreeBSD.org>2021-04-11 07:09:28 +0000
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>2021-04-11 07:23:14 +0000
commit1a4e959eb34ae03a96f6d0dea68b6a6a88ac4462 (patch)
tree1ae3e7b1b3ae7fbd95668b350e097049e82a6018 /bin
parentb77f5f5553e8ac7868b4b234a36bda3cf2db0907 (diff)
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/show.c7
-rw-r--r--bin/sh/show.h2
-rw-r--r--bin/sh/trap.c4
3 files changed, 5 insertions, 8 deletions
diff --git a/bin/sh/show.c b/bin/sh/show.c
index 04dc123381af..01035d76093d 100644
--- a/bin/sh/show.c
+++ b/bin/sh/show.c
@@ -73,7 +73,7 @@ static void
shtree(union node *n, int ind, char *pfx, FILE *fp)
{
struct nodelist *lp;
- char *s;
+ const char *s;
if (n == NULL)
return;
@@ -125,7 +125,7 @@ shcmd(union node *cmd, FILE *fp)
{
union node *np;
int first;
- char *s;
+ const char *s;
int dftfd;
first = 1;
@@ -274,8 +274,7 @@ indent(int amount, char *pfx, FILE *fp)
*/
-FILE *tracefile;
-
+static FILE *tracefile;
#if DEBUG >= 2
int debug = 1;
#else
diff --git a/bin/sh/show.h b/bin/sh/show.h
index 1dbdaa152b33..790a62e2942c 100644
--- a/bin/sh/show.h
+++ b/bin/sh/show.h
@@ -39,4 +39,6 @@ void trargs(char **);
void trputc(int);
void trputs(const char *);
void opentrace(void);
+
+extern int debug;
#endif
diff --git a/bin/sh/trap.c b/bin/sh/trap.c
index d7a98604c22c..d7ef40274270 100644
--- a/bin/sh/trap.c
+++ b/bin/sh/trap.c
@@ -274,12 +274,8 @@ setsignal(int signo)
break;
case SIGQUIT:
#ifdef DEBUG
- {
- extern int debug;
-
if (debug)
break;
- }
#endif
action = S_CATCH;
break;