commit feed3c6: [Minor] Fix format string

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jun 23 11:21:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-23 12:16:45 +0100
URL: https://github.com/rspamd/rspamd/commit/feed3c682439308ecd0f78386e26bbf8df468aa0 (HEAD -> master)

[Minor] Fix format string

---
 src/libutil/addr.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index 782b05254..9e74245a7 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -1074,7 +1074,9 @@ rspamd_inet_address_listen (const rspamd_inet_addr_t *addr, gint type,
 
 #if defined(SO_REUSEADDR)
 	if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on, sizeof (gint)) == -1) {
-		msg_err ("cannot set SO_REUSEADDR on %d: %d", fd, strerror (errno));
+		msg_err ("cannot set SO_REUSEADDR on %s (fd=%d): %s",
+				rspamd_inet_address_to_string_pretty (addr),
+				fd, strerror (errno));
 		goto err;
 	}
 #endif
@@ -1084,7 +1086,9 @@ rspamd_inet_address_listen (const rspamd_inet_addr_t *addr, gint type,
 		on = 1;
 
 		if (setsockopt (fd, SOL_SOCKET, SO_REUSEPORT, (const void *)&on, sizeof (gint)) == -1) {
-			msg_err ("cannot set SO_REUSEPORT on %d: %d", fd, strerror (errno));
+			msg_err ("cannot set SO_REUSEPORT on %s (fd=%d): %s",
+					rspamd_inet_address_to_string_pretty (addr),
+					fd, strerror (errno));
 			goto err;
 		}
 	}


More information about the Commits mailing list