summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mta.c
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2011-10-27 14:32:58 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2011-10-27 14:32:58 +0000
commit68340e85a88a67d16b1473a49ab45d0b305b1ab6 (patch)
treedfe4f3d23df936bafe3a080e6cb7d177bd2c05d0 /usr.sbin/smtpd/mta.c
parent169821d872c8e101e3e932d064f2d0be4184a1d1 (diff)
Use PRI{x,d}64 in format strings instead of %llx, %lld or %qd to print {u_,}int64_t or time_t
While there, cast some time_t to int64_t These will fix build warnings for portable smptd ok gilles@ eric@
Diffstat (limited to 'usr.sbin/smtpd/mta.c')
-rw-r--r--usr.sbin/smtpd/mta.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c
index c725aafdb50..7e4ff39d3d9 100644
--- a/usr.sbin/smtpd/mta.c
+++ b/usr.sbin/smtpd/mta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mta.c,v 1.117 2011/10/23 17:09:56 eric Exp $ */
+/* $OpenBSD: mta.c,v 1.118 2011/10/27 14:32:57 chl Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -27,6 +27,7 @@
#include <errno.h>
#include <event.h>
#include <imsg.h>
+#include <inttypes.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
@@ -702,10 +703,10 @@ mta_message_log(struct mta_session *s, struct envelope *e)
struct mta_relay *relay = TAILQ_FIRST(&s->relays);
char *status = e->errorline;
- log_info("%016llx: to=<%s@%s>, delay=%lld, relay=%s [%s], stat=%s (%s)",
+ log_info("%016" PRIx64 ": to=<%s@%s>, delay=%" PRId64 ", relay=%s [%s], stat=%s (%s)",
e->id, e->dest.user,
e->dest.domain,
- (long long int) (time(NULL) - e->creation),
+ (int64_t) (time(NULL) - e->creation),
relay ? relay->fqdn : "(none)",
relay ? ss_to_text(&relay->sa) : "",
*status == '2' ? "Sent" :