Initialize all global variables on pjdlog_init().

MFC after:	1 week
This commit is contained in:
Pawel Jakub Dawidek 2011-01-28 21:36:01 +00:00
parent 410bcbef0a
commit 70db96bf67
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218040

View File

@ -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;
}