summaryrefslogtreecommitdiff
path: root/tcpdump.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-04-08 17:31:22 -0700
committerGuy Harris <guy@alum.mit.edu>2018-04-08 17:31:22 -0700
commitee29ee496cf7b09447df631c31d95ac3ea4538b0 (patch)
tree196c877dbfcf869b20f0351bcb46b7f05aaac0f4 /tcpdump.c
parent87b129ad3a96a9a29d3bd36a945f69ddf4dad911 (diff)
downloadtcpdump-ee29ee496cf7b09447df631c31d95ac3ea4538b0.tar.gz
Some additional cleanups.
Use define(XXX) to check for signal codes being defined. Make the signal handlers for SIGINFO/SIGUSR1 and SIGUSR2 static.
Diffstat (limited to 'tcpdump.c')
-rw-r--r--tcpdump.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tcpdump.c b/tcpdump.c
index 7f6e0780..e91c8f4c 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -142,9 +142,9 @@ The Regents of the University of California. All rights reserved.\n";
#define PATH_MAX 1024
#endif
-#ifdef SIGINFO
+#if defined(SIGINFO)
#define SIGNAL_REQ_INFO SIGINFO
-#elif SIGUSR1
+#elif defined(SIGUSR1)
#define SIGNAL_REQ_INFO SIGUSR1
#endif
@@ -233,11 +233,11 @@ static void dump_packet(u_char *, const struct pcap_pkthdr *, const u_char *);
static void droproot(const char *, const char *);
#ifdef SIGNAL_REQ_INFO
-void requestinfo(int);
+static void requestinfo(int);
#endif
#ifdef SIGNAL_FLUSH_PCAP
-void flushpcap(int);
+static void flushpcap(int);
#endif
#ifdef _WIN32
@@ -2910,7 +2910,8 @@ print_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
}
#ifdef SIGNAL_REQ_INFO
-void requestinfo(int signo _U_)
+static void
+requestinfo(int signo _U_)
{
if (infodelay)
++infoprint;
@@ -2920,7 +2921,8 @@ void requestinfo(int signo _U_)
#endif
#ifdef SIGNAL_FLUSH_PCAP
-void flushpcap(int signo _U_)
+static void
+flushpcap(int signo _U_)
{
if (pdd != NULL)
pcap_dump_flush(pdd);