]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/log.c
fixing small memory leak
[irc/evilnet/x3.git] / src / log.c
index 3b5d7fc046a02adc5283b6e1f3f483d93a3302b1..ef531ee4363bd2020cebdd17564ebbd90cc5eb92 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -3,7 +3,7 @@
  *
  * This file is part of x3.
  *
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
@@ -541,7 +541,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 + type->max_age < (unsigned long)now))
+    while (type->log_oldest && (type->log_oldest->time + (time_t)type->max_age < now))
         log_type_free_oldest(type);
     if (type->log_oldest)
         type->log_oldest->prev = 0;
@@ -602,7 +602,7 @@ log_module(struct log_type *type, enum log_severity sev, const char *format, ...
         fprintf(stderr, "%s: %s\n", log_severity_names[sev], msgbuf);
     }
     if (sev == LOG_FATAL) {
-        assert(0 && "fatal message logged");
+        //assert(0 && "fatal message logged");
         _exit(1);
     }
 }