From 045ebf11b8eef9507aaa17a39bc9779256814f93 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Mon, 12 Jan 2015 02:06:36 -0500 Subject: Fixed Windows build Apparently ERROR was defined as some constant somewhere on Windows. --- toxcore/logger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'toxcore/logger.c') diff --git a/toxcore/logger.c b/toxcore/logger.c index 2ef5f21a..2c6cf345 100644 --- a/toxcore/logger.c +++ b/toxcore/logger.c @@ -109,16 +109,16 @@ logger *logger_new (const char *file_name, LOG_LEVEL level, const char *id) if (!(retu->tstr = calloc(16, sizeof (char))) || !(retu->posstr = calloc(300, sizeof (char))) || !(retu->msg = calloc(4096, sizeof (char))) ) - goto ERROR; + goto FAILURE; if (id) { if (!(retu->id = calloc(strlen(id) + 1, 1))) - goto ERROR; + goto FAILURE; strcpy(retu->id, id); } else { if (!(retu->id = malloc(8))) - goto ERROR; + goto FAILURE; snprintf(retu->id, 8, "%u", random_int()); } @@ -131,7 +131,7 @@ logger *logger_new (const char *file_name, LOG_LEVEL level, const char *id) return retu; -ERROR: +FAILURE: fprintf(stderr, "Failed to create logger!\n"); pthread_mutex_destroy(retu->mutex); fclose(retu->log_file); -- cgit v1.2.3