Loading...
gen/syslog.c Libc-498.1.5 Libc-498
--- Libc/Libc-498.1.5/gen/syslog.c
+++ Libc/Libc-498/gen/syslog.c
@@ -69,7 +69,6 @@
 #include <stdint.h>
 #include <string.h>
 #include <time.h>
-#include <sys/time.h>
 #include <unistd.h>
 #include <notify.h>
 #include <asl.h>
@@ -147,7 +146,6 @@
 {
 	int status, i, saved_errno, filter, rc_filter;
 	time_t tick;
-	struct timeval tval;
 	pid_t pid;
 	uint32_t elen, count;
 	char *p, *str, *expanded, *err_str, hname[MAXHOSTNAMELEN+1];
@@ -214,41 +212,16 @@
 	if (str != NULL) asl_set(msg, ASL_KEY_FACILITY, str);
 
 	str = NULL;
-	memset(&tval, 0, sizeof(struct timeval));
-
-	status = gettimeofday(&tval, NULL);
-	if (status == 0)
-	{
-		str = NULL;
-		asprintf(&str, "%lu", tval.tv_sec);
-		if (str != NULL)
-		{
-			asl_set(msg, ASL_KEY_TIME, str);
-			free(str);
-		}
-
-		str = NULL;
-		asprintf(&str, "%lu", tval.tv_usec * 1000);
-		if (str != NULL)
-		{
-			asl_set(msg, ASL_KEY_TIME_NSEC, str);
-			free(str);
-		}
-	}
-	else
-	{
-		tick = time(NULL);
-		str = NULL;
-		asprintf(&str, "%lu", tick);
-		if (str != NULL)
-		{
-			asl_set(msg, ASL_KEY_TIME, str);
-			free(str);
-		}
-	}
-	
+	tick = time(NULL);
+	asprintf(&str, "%lu", tick);
+	if (str != NULL)
+	{
+		asl_set(msg, ASL_KEY_TIME, str);
+		free(str);
+	}
+
+	str = NULL;
 	pid = getpid();
-	str = NULL;
 	asprintf(&str, "%u", pid);
 	if (str != NULL)
 	{
@@ -363,7 +336,7 @@
 	}
 
 	/* Get connected, output the message to the local logger. */
-	str = asl_format_message(msg, ASL_MSG_FMT_RAW, ASL_TIME_FMT_SEC, ASL_ENCODE_ASL, &count);
+	str = asl_format_message(msg, ASL_MSG_FMT_RAW, ASL_TIME_FMT_SEC, &count);
 	if (str != NULL)
 	{
 		p = NULL;
@@ -401,7 +374,7 @@
 	{
 		count = 0;
 
-		p = asl_format_message(msg, ASL_MSG_FMT_STD, ASL_TIME_FMT_LCL, ASL_ENCODE_SAFE, &count);
+		p = asl_format_message(msg, ASL_MSG_FMT_STD, ASL_TIME_FMT_LCL, &count);
 		if (p != NULL)
 		{
 			struct iovec iov;