Minor, staticify global variables and fix indentation

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-10-29 10:42:45 +01:00
parent 48a9f1fdd7
commit 08aa942ffb

View File

@ -269,32 +269,31 @@ struct code FacNames[] = {
static int Debug; /* debug flag */ static int Debug; /* debug flag */
static int Foreground = 0; /* don't fork - don't run in daemon mode */ static int Foreground = 0; /* don't fork - don't run in daemon mode */
char LocalHostName[MAXHOSTNAMELEN + 1]; /* our hostname */ static char LocalHostName[MAXHOSTNAMELEN + 1]; /* our hostname */
char *LocalDomain; /* our local domain name */ static char *LocalDomain; /* our local domain name */
char *emptystring = ""; static char *emptystring = "";
int InetInuse = 0; /* non-zero if INET sockets are being used */ static int InetInuse = 0; /* non-zero if INET sockets are being used */
int *finet = NULL; /* Internet datagram sockets */ static int *finet = NULL; /* Internet datagram sockets */
int Initialized = 0; /* set when we have initialized ourselves */ static int Initialized = 0; /* set when we have initialized ourselves */
int MarkInterval = 20 * 60; /* interval between marks in seconds */ static int MarkInterval = 20 * 60; /* interval between marks in seconds */
int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */ static int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
static int mask_C1 = 1; /* mask characters from 0x80 - 0x9F */ static int mask_C1 = 1; /* mask characters from 0x80 - 0x9F */
static int send_to_all; /* send message to all IPv4/IPv6 addresses */ static int send_to_all; /* send message to all IPv4/IPv6 addresses */
int MarkSeq = 0; /* mark sequence number */ static int MarkSeq = 0; /* mark sequence number */
static int RemoteAddDate; /* Always set the date on remote messages */ static int RemoteAddDate; /* Always set the date on remote messages */
static int RemoteHostname; /* Log remote hostname from the message */ static int RemoteHostname; /* Log remote hostname from the message */
static int KeepKernFac; /* Keep remotely logged kernel facility */ static int KeepKernFac; /* Keep remotely logged kernel facility */
int LastAlarm = 0; /* last value passed to alarm() (seconds) */ static int LastAlarm = 0; /* last value passed to alarm() (seconds) */
int DupesPending = 0; /* Number of unflushed duplicate messages */ static int DupesPending = 0; /* Number of unflushed duplicate messages */
int AcceptRemote = 0; /* receive messages that come via UDP */ static int AcceptRemote = 0; /* receive messages that come via UDP */
char **StripDomains = NULL; /* these domains may be stripped before writing logs */ static char **StripDomains = NULL; /* these domains may be stripped before writing logs */
char **LocalHosts = NULL; /* these hosts are logged with their hostname */ static char **LocalHosts = NULL; /* these hosts are logged with their hostname */
int NoHops = 1; /* Can we bounce syslog messages through an intermediate host. */ static int NoHops = 1; /* Can we bounce syslog messages through an intermediate host. */
static off_t RotateSz = 0; /* Max file size (bytes) before rotating, disabled by default */ static off_t RotateSz = 0; /* Max file size (bytes) before rotating, disabled by default */
static int RotateCnt = 5; /* Max number (count) of log files to keep, set with -c <NUM> */ static int RotateCnt = 5; /* Max number (count) of log files to keep, set with -c <NUM> */
extern int errno;
/* Function prototypes. */ /* Function prototypes. */
char **crunch_list(char *list); char **crunch_list(char *list);