From ead73bd3493c517fde508aecf6bc097aeae1752c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 24 Jun 2011 22:49:58 +0200 Subject: [PATCH] Make a few variables static. * defs.h: Remove tcbtab declaration. * strace.c: Make run_uid, run_gid, outf, tcbtab, progname global variables static Signed-off-by: Denys Vlasenko --- defs.h | 1 - strace.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/defs.h b/defs.h index 0632a750..d3d8916e 100644 --- a/defs.h +++ b/defs.h @@ -502,7 +502,6 @@ typedef enum { CFLAG_BOTH } cflag_t; -extern struct tcb **tcbtab; extern int *qual_flags; extern int debug, followfork; extern unsigned int ptrace_setoptions; diff --git a/strace.c b/strace.c index f22375ae..c3fd9483 100644 --- a/strace.c +++ b/strace.c @@ -118,17 +118,17 @@ static int strace_child = 0; static int strace_tracer_pid = 0; static char *username = NULL; -uid_t run_uid; -gid_t run_gid; +static uid_t run_uid; +static gid_t run_gid; int acolumn = DEFAULT_ACOLUMN; int max_strlen = DEFAULT_STRLEN; static char *outfname = NULL; -FILE *outf; +static FILE *outf; static int curcol; -struct tcb **tcbtab; +static struct tcb **tcbtab; static unsigned int nprocs, tcbtabsize; -const char *progname; +static const char *progname; static int detach(struct tcb *tcp, int sig); static int trace(void); -- 2.40.0