summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/queue_shared.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/queue_shared.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/queue_shared.c')
-rw-r--r--usr.sbin/smtpd/queue_shared.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/queue_shared.c b/usr.sbin/smtpd/queue_shared.c
index 9b7a4b8e2ce..fd32686696f 100644
--- a/usr.sbin/smtpd/queue_shared.c
+++ b/usr.sbin/smtpd/queue_shared.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue_shared.c,v 1.52 2011/10/23 09:30:07 gilles Exp $ */
+/* $OpenBSD: queue_shared.c,v 1.53 2011/10/27 14:32:57 chl Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -31,6 +31,7 @@
#include <event.h>
#include <fcntl.h>
#include <imsg.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -292,7 +293,7 @@ display_envelope(struct envelope *e, int flags)
status, sizeof(status));
if (e->status)
- errx(1, "%016llx: unexpected status 0x%04x", e->id,
+ errx(1, "%016" PRIx64 ": unexpected status 0x%04x", e->id,
e->status);
getflag(&e->flags, DF_BOUNCE, "BOUNCE",
@@ -305,7 +306,7 @@ display_envelope(struct envelope *e, int flags)
status, sizeof(status));
if (e->flags)
- errx(1, "%016llx: unexpected flags 0x%04x", e->id,
+ errx(1, "%016" PRIx64 ": unexpected flags 0x%04x", e->id,
e->flags);
if (status[0])
@@ -327,13 +328,13 @@ display_envelope(struct envelope *e, int flags)
printf("UNKNOWN");
}
- printf("|%016llx|%s|%s@%s|%s@%s|%lld|%lld|%u",
+ printf("|%016" PRIx64 "|%s|%s@%s|%s@%s|%" PRId64 "|%" PRId64 "|%u",
e->id,
status,
e->sender.user, e->sender.domain,
e->dest.user, e->dest.domain,
- (long long int) e->lasttry,
- (long long int) e->expire,
+ (int64_t) e->lasttry,
+ (int64_t) e->expire,
e->retry);
if (e->errorline[0] != '\0')