mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 19:03:48 +01:00
Initialize all global variables on pjdlog_init().
MFC after: 1 week
This commit is contained in:
parent
410bcbef0a
commit
70db96bf67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218040
@ -43,8 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "pjdlog.h"
|
||||
|
||||
static bool pjdlog_initialized = false;
|
||||
static int pjdlog_mode = PJDLOG_MODE_STD;
|
||||
static int pjdlog_debug_level = 0;
|
||||
static int pjdlog_mode, pjdlog_debug_level;
|
||||
static char pjdlog_prefix[128];
|
||||
|
||||
void
|
||||
@ -57,6 +56,8 @@ pjdlog_init(int mode)
|
||||
if (mode == PJDLOG_MODE_SYSLOG)
|
||||
openlog(NULL, LOG_PID | LOG_NDELAY, LOG_DAEMON);
|
||||
pjdlog_mode = mode;
|
||||
pjdlog_debug_level = 0;
|
||||
bzero(pjdlog_prefix, sizeof(pjdlog_prefix));
|
||||
|
||||
pjdlog_initialized = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user