diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-01-31 11:32:49 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-31 11:32:49 +0100 |
commit | 1de0ea4abd7153c6fcdbdbac6048a1e46f673fc2 (patch) | |
tree | c81a8d6c58fcee19cead9cce8122ec35342428b1 /listen/listen.c | |
parent | aa1bfde879f3c5885199d7bb4720efaabff67d8c (diff) |
Sort out variable and function declarations.
- Make static what can be made static.
- Add declaration where they were missing.
- Don't define variables in headers.
- Move declaations to the proper locations.
- Pick up declarations from the proper headers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'listen/listen.c')
-rw-r--r-- | listen/listen.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/listen/listen.c b/listen/listen.c index 1e311fb..e317e22 100644 --- a/listen/listen.c +++ b/listen/listen.c @@ -26,9 +26,9 @@ #include <config.h> #include "listen.h" -struct timeval t_recv; -int tflag = 0; -int32_t thiszone; /* seconds offset from gmt to local time */ +static struct timeval t_recv; +static int tflag = 0; +static int32_t thiszone; /* seconds offset from gmt to local time */ static int sigint; static int sock; @@ -47,8 +47,7 @@ static void display_port(char *dev) /* * Format the timestamp */ -char * -ts_format(register int sec, register int usec) +static char * ts_format(register int sec, register int usec) { static char buf[sizeof("00:00:00.000000")]; (void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%06u", @@ -60,8 +59,7 @@ ts_format(register int sec, register int usec) /* * Print the timestamp */ -void -ts_print(register const struct timeval *tvp) +static void ts_print(register const struct timeval *tvp) { register int s; struct tm *tm; @@ -132,7 +130,7 @@ void display_timestamp(void) /* from tcpdump gmtlocal.c */ -int32_t gmt2local(time_t t) +static int32_t gmt2local(time_t t) { register int dt, dir; register struct tm *gmt, *loc; |