From 1f035edbe1ec3f8c846896b2672386a0b0bbc4d5 Mon Sep 17 00:00:00 2001 From: gilles Date: Sat, 19 Apr 2014 13:40:24 +0000 Subject: [PATCH] (void) cast strlcpy() and snprintf() that cannot truncate --- usr.sbin/smtpd/queue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index 62ab6f97665..5f68ad86f86 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.161 2014/04/08 15:25:43 eric Exp $ */ +/* $OpenBSD: queue.c,v 1.162 2014/04/19 13:40:24 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -688,10 +688,10 @@ queue_log(const struct envelope *e, const char *prefix, const char *status) { char rcpt[SMTPD_MAXLINESIZE]; - strlcpy(rcpt, "-", sizeof rcpt); + (void)strlcpy(rcpt, "-", sizeof rcpt); if (strcmp(e->rcpt.user, e->dest.user) || strcmp(e->rcpt.domain, e->dest.domain)) - snprintf(rcpt, sizeof rcpt, "%s@%s", + (void)snprintf(rcpt, sizeof rcpt, "%s@%s", e->rcpt.user, e->rcpt.domain); log_info("%s: %s for %016" PRIx64 ": from=<%s@%s>, to=<%s@%s>, " -- 2.20.1