Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mxq_log: Use mx_streq()
  • Loading branch information
mariux committed Oct 26, 2015
1 parent bc32b56 commit b57816c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mxq_log.c
Expand Up @@ -8,6 +8,8 @@
#include <unistd.h>

#include "mx_log.h"
#include "mx_util.h"

#ifndef mx_free_null
#include <stdlib.h>
#define mx_free_null(a) do { free((a)); (a) = NULL; } while(0)
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit b57816c

Please sign in to comment.