summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/smtppass.c8
-rw-r--r--configure.in2
2 files changed, 6 insertions, 4 deletions
diff --git a/common/smtppass.c b/common/smtppass.c
index 92b7daa..bbd1e8c 100644
--- a/common/smtppass.c
+++ b/common/smtppass.c
@@ -247,7 +247,7 @@ void sp_init(const char* name)
int sp_run(const char* configfile, const char* pidfile, int dbg_level)
{
int sock;
- int true = 1;
+ int tru = 1;
ASSERT(configfile);
ASSERT(g_state.name);
@@ -317,7 +317,7 @@ int sp_run(const char* configfile, const char* pidfile, int dbg_level)
}
fcntl(sock, F_SETFD, fcntl(sock, F_GETFD, 0) | FD_CLOEXEC);
- setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&true, sizeof(true));
+ setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&tru, sizeof(tru));
/* Unlink the socket file if it exists */
if(SANY_TYPE(g_state.listenaddr) == AF_UNIX)
@@ -1811,7 +1811,7 @@ const char kMsgDelimiter[] = ": ";
static void vmessage(spctx_t* ctx, int level, int err,
const char* msg, va_list ap)
{
- char buf[MAX_MSGLEN];
+ char buf[MAX_MSGLEN] = { 0, };
int e = errno;
if(g_state.daemonized)
@@ -1839,7 +1839,7 @@ static void vmessage(spctx_t* ctx, int level, int err,
strerror_r(e, buf + len, MAX_MSGLEN - len); */
sp_lock();
- strncat(buf, strerror(e), MAX_MSGLEN);
+ strncat(buf, strerror(e), MAX_MSGLEN - 1);
sp_unlock();
}
diff --git a/configure.in b/configure.in
index 70257eb..b6ce040 100644
--- a/configure.in
+++ b/configure.in
@@ -51,6 +51,8 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+CFLAGS="$CFLAGS -g -O0 -Wall -Wno-deprecated-declarations"
+
# Debug mode
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],