X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=syslogd.c;h=14219eb541f2b8710d91951abc3362966841f4cc;hb=220238305f8b6604fbc2eca463f9cd0dd755f1ad;hp=89f5348ec94ffbd197fac8ee275873ffe33d4463;hpb=22ecf049b634ccd507ed0587526599ed1971c308;p=oweals%2Fbusybox.git diff --git a/syslogd.c b/syslogd.c index 89f5348ec..14219eb54 100644 --- a/syslogd.c +++ b/syslogd.c @@ -55,7 +55,7 @@ #define __LOG_FILE "/var/log/messages" /* Path to the unix socket */ -static char lfile[BUFSIZ] = ""; +static char lfile[BUFSIZ]; static char *logFilePath = __LOG_FILE; @@ -346,7 +346,7 @@ static const int IOV_COUNT = 2; struct iovec iov[IOV_COUNT]; struct iovec *v = iov; - bzero(&res, sizeof(res)); + memset(&res, 0, sizeof(res)); snprintf(res, sizeof(res), "<%d>", pri); v->iov_base = res ; v->iov_len = strlen(res); @@ -431,6 +431,7 @@ static int serveConnection (int conn) /* Now log it */ logMessage (pri, line); } + RELEASE_BB_BUFFER (tmpbuf); return n_read; } @@ -442,7 +443,7 @@ static void init_RemoteLog (void){ struct hostent *hostinfo; int len = sizeof(remoteaddr); - bzero(&remoteaddr, len); + memset(&remoteaddr, 0, len); remotefd = socket(AF_INET, SOCK_DGRAM, 0);