diff --git a/Makefile b/Makefile index a9f5846..b6b0e80 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ manpages/%: manpages/%.xml .PHONY: all .PHONY: build -all: build +all: build test .PHONY: devel devel: CFLAGS += -DMXQ_DEVELOPMENT diff --git a/mx_log.c b/mx_log.c index ba5a8d5..6a6a5b5 100644 --- a/mx_log.c +++ b/mx_log.c @@ -109,7 +109,7 @@ static int log_log(int level, int loglevel, char *file, unsigned long line, cons prefix = "EMERGENCY: "; break; case MX_LOG_ALERT: - prefix = "AKERT: "; + prefix = "ALERT: "; break; case MX_LOG_CRIT: prefix = "CRITCAL ERROR: "; diff --git a/mxq_log.c b/mxq_log.c index d59ffac..77b40b5 100644 --- a/mxq_log.c +++ b/mxq_log.c @@ -8,6 +8,8 @@ #include #include "mx_log.h" +#include "mx_util.h" + #ifndef mx_free_null #include #define mx_free_null(a) do { free((a)); (a) = NULL; } while(0) @@ -42,7 +44,6 @@ static int timetag(char *buf, size_t size) int mx_log_print(char *msg, size_t len) { - int res; char timebuf[1024]; static char *lastmsg = NULL; @@ -61,8 +62,7 @@ int mx_log_print(char *msg, size_t len) return -(errno=EINVAL); if (lastmsg && lastlen == len) { - res = strcmp(msg, lastmsg); - if (res == 0) { + if (mx_streq(msg, lastmsg)) { cnt++; mx_free_null(msg); return 2;