diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2014-04-19 14:21:27 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2014-04-19 14:21:27 +0000 |
commit | d77a3619586006af843a63604a1d7172f41950d4 (patch) | |
tree | cef8deb4afcd7399816729db6df6bbcb1f13fefb | |
parent | 59eb9d26dbfb98904efb9297973ecb347a4cb31a (diff) |
(void) cast strlcpy() calls that cannot truncate
-rw-r--r-- | usr.sbin/smtpd/table_socketmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/table_socketmap.c b/usr.sbin/smtpd/table_socketmap.c index 174004a4ca1..ea49af80b56 100644 --- a/usr.sbin/smtpd/table_socketmap.c +++ b/usr.sbin/smtpd/table_socketmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_socketmap.c,v 1.2 2014/02/04 16:41:08 eric Exp $ */ +/* $OpenBSD: table_socketmap.c,v 1.3 2014/04/19 14:21:26 gilles Exp $ */ /* * Copyright (c) 2014 Gilles Chehade <gilles@poolp.org> @@ -146,7 +146,7 @@ table_socketmap_query(const char *name, const char *key) buf = fgetln(sockstream, &len); if (buf == NULL) { log_warnx("warn: table-socketmap: socketmap has lost its socket"); - strlcpy(repbuffer, "lost connection to socket", sizeof repbuffer); + (void)strlcpy(repbuffer, "lost connection to socket", sizeof repbuffer); ret = SM_PERM; goto err; } @@ -155,7 +155,7 @@ table_socketmap_query(const char *name, const char *key) else { if ((lbuf = malloc(len + 1)) == NULL) { log_warnx("warn: table-socketmap: memory exhaustion"); - strlcpy(repbuffer, "memory exhaustion", sizeof repbuffer); + (void)strlcpy(repbuffer, "memory exhaustion", sizeof repbuffer); ret = SM_PERM; goto err; } @@ -169,7 +169,7 @@ table_socketmap_query(const char *name, const char *key) if (strlcpy(repbuffer, buf, sizeof repbuffer) >= sizeof repbuffer) { log_warnx("warn: table-socketmap: socketmap reply too large (>%zu bytes)", sizeof repbuffer); - strlcpy(repbuffer, "socketmap reply too large", sizeof repbuffer); + (void)strlcpy(repbuffer, "socketmap reply too large", sizeof repbuffer); ret = SM_PERM; goto err; } @@ -196,7 +196,7 @@ table_socketmap_query(const char *name, const char *key) } else { ret = SM_PERM; - strlcpy(repbuffer, "unrecognized socketmap reply", sizeof repbuffer); + (void)strlcpy(repbuffer, "unrecognized socketmap reply", sizeof repbuffer); } err: |