From 2b9f0480a19ded03ecc1bca88f83eb10e8b1e2a0 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Sun, 15 May 2022 21:02:41 +0100 Subject: [PATCH] Fix #1549 - fix typo in log format specifier --- mongoose.c | 2 +- src/sock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 4a6d823e..f9e7d438 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3372,7 +3372,7 @@ bool mg_open_listener(struct mg_connection *c, const char *url) { } else if (setsockopt(fd, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &on, sizeof(on)) != 0) { // "Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE" - MG_ERROR(("exclusiveaddruse: %s", MG_SOCK_ERRNO)); + MG_ERROR(("exclusiveaddruse: %d", MG_SOCK_ERRNO)); #endif } else if (bind(fd, &usa.sa, slen) != 0) { MG_ERROR(("bind: %d", MG_SOCK_ERRNO)); diff --git a/src/sock.c b/src/sock.c index 67006528..9144df87 100644 --- a/src/sock.c +++ b/src/sock.c @@ -238,7 +238,7 @@ bool mg_open_listener(struct mg_connection *c, const char *url) { } else if (setsockopt(fd, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &on, sizeof(on)) != 0) { // "Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE" - MG_ERROR(("exclusiveaddruse: %s", MG_SOCK_ERRNO)); + MG_ERROR(("exclusiveaddruse: %d", MG_SOCK_ERRNO)); #endif } else if (bind(fd, &usa.sa, slen) != 0) { MG_ERROR(("bind: %d", MG_SOCK_ERRNO));