From 88462e90c807b1a0da16f79aa753b4b0e32dfe74 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Sat, 19 Apr 2014 17:28:47 +0500 Subject: hash is a fixed length string. Copying is always done to same length buffer. Explicitly cast to void for clarity. --- maildrop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/maildrop.c b/maildrop.c index e18983e..e4f1383 100644 --- a/maildrop.c +++ b/maildrop.c @@ -282,7 +282,7 @@ list(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb) do_list(req->idx, &sz, hash, sizeof(hash)); res.uidl = req->uidl; if (res.uidl) - strlcpy(res.u.hash, hash, sizeof(res.u.hash)); + (void)strlcpy(res.u.hash, hash, sizeof(res.u.hash)); else res.u.sz = sz; @@ -296,12 +296,12 @@ do_list(unsigned int idx, size_t *sz, char *hash, size_t hash_sz) { if (m.msgs_index[idx]->flags & F_DELE) { *sz = 0; - strlcpy(hash, "", hash_sz); + (void)strlcpy(hash, "", hash_sz); return; } *sz = m.msgs_index[idx]->sz; - strlcpy(hash, m.msgs_index[idx]->hash, hash_sz); + (void)strlcpy(hash, m.msgs_index[idx]->hash, hash_sz); } static void @@ -318,7 +318,7 @@ list_all(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb) res.idx = i; res.uidl = *uidl; if (*uidl) { - strlcpy(res.u.hash, m.msgs_index[i]->hash, + (void)strlcpy(res.u.hash, m.msgs_index[i]->hash, sizeof(res.u.hash)); } else res.u.sz = m.msgs_index[i]->sz; @@ -331,7 +331,7 @@ list_all(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb) res.uidl = *uidl; /* terminal sentinel: hash = "" and sz = 0 */ if (*uidl) - strlcpy(res.u.hash, "", sizeof(res.u.hash)); + (void)strlcpy(res.u.hash, "", sizeof(res.u.hash)); else res.u.sz = 0; -- cgit v1.2.3