From: gilles Date: Sat, 19 Apr 2014 17:36:54 +0000 (+0000) Subject: (void) cast snprintf() calls that cannot truncate (and would be harmless X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fd77dd20e2d0c0c08c95429422612930e1c58207;p=openbsd (void) cast snprintf() calls that cannot truncate (and would be harmless otherwise) --- diff --git a/usr.sbin/smtpd/ioev.c b/usr.sbin/smtpd/ioev.c index eddaaf58e85..c1d6736cb8b 100644 --- a/usr.sbin/smtpd/ioev.c +++ b/usr.sbin/smtpd/ioev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioev.c,v 1.17 2014/04/19 12:48:54 gilles Exp $ */ +/* $OpenBSD: ioev.c,v 1.18 2014/04/19 17:36:54 gilles Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -88,7 +88,7 @@ io_strio(struct io *io) ssl[0] = '\0'; #ifdef IO_SSL if (io->ssl) { - snprintf(ssl, sizeof ssl, " ssl=%s:%s:%d", + (void)snprintf(ssl, sizeof ssl, " ssl=%s:%s:%d", SSL_get_cipher_version(io->ssl), SSL_get_cipher_name(io->ssl), SSL_get_cipher_bits(io->ssl, NULL)); @@ -96,11 +96,11 @@ io_strio(struct io *io) #endif if (io->iobuf == NULL) - snprintf(buf, sizeof buf, + (void)snprintf(buf, sizeof buf, "", io, io->sock, io->timeout, io_strflags(io->flags), ssl); else - snprintf(buf, sizeof buf, + (void)snprintf(buf, sizeof buf, "", io, io->sock, io->timeout, io_strflags(io->flags), ssl, io_pending(io), io_queued(io)); @@ -125,7 +125,7 @@ io_strevent(int evt) CASE(IO_TIMEOUT); CASE(IO_ERROR); default: - snprintf(buf, sizeof(buf), "IO_? %d", evt); + (void)snprintf(buf, sizeof(buf), "IO_? %d", evt); return buf; } }