aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-04 20:31:24 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-08-04 20:31:24 +0400
commit3f96e6a7a317e70b85b32de4aa06681c11d79006 (patch)
tree70343e3fb1a43d29d9c4f454fa47b2dcad6249ad /src/smtp.c
parent6b86782ce21caad081d41f54ef10233a8e757189 (diff)
downloadrspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.tar.gz
rspamd-3f96e6a7a317e70b85b32de4aa06681c11d79006.zip
Fix signness in arithmetic operations.
Diffstat (limited to 'src/smtp.c')
-rw-r--r--src/smtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smtp.c b/src/smtp.c
index c2fa22980..0c8b8d5aa 100644
--- a/src/smtp.c
+++ b/src/smtp.c
@@ -282,7 +282,7 @@ process_smtp_data (struct smtp_session *session)
}
/* Now mmap temp file if it is small enough */
session->temp_size = st.st_size;
- if (session->ctx->max_size == 0 || st.st_size < session->ctx->max_size) {
+ if (session->ctx->max_size == 0 || st.st_size < (off_t)session->ctx->max_size) {
session->task = construct_task (session->worker);
session->task->resolver = session->resolver;
session->task->fin_callback = smtp_write_socket;
@@ -405,7 +405,7 @@ smtp_read_socket (f_str_t * in, void *arg)
return process_smtp_data (session);
}
- if (write (session->temp_fd, in->begin, in->len) != in->len) {
+ if (write (session->temp_fd, in->begin, in->len) != (ssize_t)in->len) {
msg_err ("cannot write to temp file: %s", strerror (errno));
session->error = SMTP_ERROR_FILE;
session->state = SMTP_STATE_CRITICAL_ERROR;