diff options
author | Omar Polo <op@cvs.openbsd.org> | 2023-11-03 13:38:29 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2023-11-03 13:38:29 +0000 |
commit | 546c0c9a5d87a026c2bb69edd4b9f1cdd9338ecc (patch) | |
tree | c6d5776423847b8ab9055a0980b3d900eb1e2a8f /usr.sbin | |
parent | ab5f8bc7e0a40ba2db612f5bef60877a9370e39c (diff) |
cast tv_usec to long for *printf
mostly for -portable; on darwin suseconds_t is an int.
ok tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 10 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index c67b7ba4df9..e53b161969b 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.73 2023/07/07 14:52:00 op Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.74 2023/11/03 13:38:28 op Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -916,13 +916,13 @@ filter_protocol_query(struct filter *filter, uint64_t token, uint64_t reqid, con n = io_printf(lka_proc_get_io(filter->proc), "filter|%s|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s|%s\n", PROTOCOL_VERSION, - (long long)tv.tv_sec, tv.tv_usec, + (long long)tv.tv_sec, (long)tv.tv_usec, phase, reqid, token, fs->rdns, param); else n = io_printf(lka_proc_get_io(filter->proc), "filter|%s|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s\n", PROTOCOL_VERSION, - (long long)tv.tv_sec, tv.tv_usec, + (long long)tv.tv_sec, (long)tv.tv_usec, phase, reqid, token, param); if (n == -1) fatalx("failed to write to processor"); @@ -940,7 +940,7 @@ filter_data_query(struct filter *filter, uint64_t token, uint64_t reqid, const c "filter|%s|%lld.%06ld|smtp-in|data-line|" "%016"PRIx64"|%016"PRIx64"|%s\n", PROTOCOL_VERSION, - (long long)tv.tv_sec, tv.tv_usec, + (long long)tv.tv_sec, (long)tv.tv_usec, reqid, token, line); if (n == -1) fatalx("failed to write to processor"); @@ -1357,7 +1357,7 @@ report_smtp_broadcast(uint64_t reqid, const char *direction, struct timeval *tv, va_start(ap, format); if (io_printf(lka_proc_get_io(rp->name), "report|%s|%lld.%06ld|%s|%s|%016"PRIx64"%s", - PROTOCOL_VERSION, (long long)tv->tv_sec, tv->tv_usec, + PROTOCOL_VERSION, (long long)tv->tv_sec, (long)tv->tv_usec, direction, event, reqid, format[0] != '\n' ? "|" : "") == -1 || io_vprintf(lka_proc_get_io(rp->name), format, ap) == -1) diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index ca21c5b86d4..7848ece404a 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.436 2023/10/09 20:55:32 millert Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.437 2023/11/03 13:38:28 op Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -2279,7 +2279,7 @@ smtp_auth_failure_pause(struct smtp_session *s) tv.tv_sec = 0; tv.tv_usec = arc4random_uniform(1000000); log_trace(TRACE_SMTP, "smtp: timing-attack protection triggered, " - "will defer answer for %lu microseconds", tv.tv_usec); + "will defer answer for %lu microseconds", (long)tv.tv_usec); evtimer_set(&s->pause, smtp_auth_failure_resume, s); evtimer_add(&s->pause, &tv); } |