Remove extraneous semicolons from end of macro uses.
[srvx.git] / src / log.c
index ad341b80d4bc2ea0880f9c8eab59d84fed8f94b6..fe9f74a35848f7ee271ecc8f0be2d55b5b9ee8e8 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -73,7 +73,7 @@ static struct dict *log_types;
 static struct log_type *log_default;
 static int log_inited, log_debugged;
 
-DEFINE_LIST(logList, struct logDestination*);
+DEFINE_LIST(logList, struct logDestination*)
 static void log_format_audit(struct logEntry *entry);
 static const struct message_entry msgtab[] = {
     { "MSG_INVALID_FACILITY", "$b%s$b is an invalid log facility." },
@@ -527,7 +527,7 @@ log_audit(struct log_type *type, enum log_severity sev, struct userNode *user, s
     /* remove old elements from the linked list */
     while (type->log_count > type->max_count)
         log_type_free_oldest(type);
-    while (type->log_oldest && (type->log_oldest->time + (time_t)type->max_age < now))
+    while (type->log_oldest && (type->log_oldest->time + type->max_age < now))
         log_type_free_oldest(type);
     if (type->log_oldest)
         type->log_oldest->prev = 0;
@@ -753,10 +753,12 @@ log_entry_search(struct logSearch *discrim, entry_search_func esf, void *data)
 /* generic helper functions */
 
 static void
-log_format_timestamp(time_t when, struct string_buffer *sbuf)
+log_format_timestamp(unsigned long when, struct string_buffer *sbuf)
 {
     struct tm local;
-    localtime_r(&when, &local);
+    time_t feh;
+    feh = when;
+    localtime_r(&feh, &local);
     if (sbuf->size < 24) {
         sbuf->size = 24;
         free(sbuf->list);