fix possible crash on user deletion
[srvx.git] / src / mail-smtp.c
index 13a6c383d7969a9ee305e6fedc3b47460f895f3f..b1b50955dc294296327b801b51b2ac4178e3ae6c 100644 (file)
@@ -79,7 +79,7 @@ static struct {
     int enabled;
 } smtp_conf;
 
-DEFINE_LIST(mail_queue, struct pending_mail *);
+DEFINE_LIST(mail_queue, struct pending_mail *)
 
 static void mail_println(const char *fmt, ...)
 {
@@ -138,7 +138,7 @@ static void smtp_fill_name(char *namebuf, size_t buflen)
     }
     res = getnameinfo(sa, sa_len, namebuf, buflen, NULL, 0, NI_NUMERICHOST);
     if (res != 0) {
-        log_module(MAIL_LOG, LOG_ERROR, "Unable to get text form of socket name: %s", strerror(errno));
+        log_module(MAIL_LOG, LOG_ERROR, "Unable to get text form of socket name: %s", gai_strerror(res));
     }
 }