summaryrefslogtreecommitdiff
path: root/maildrop.c
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@sunilnimmagadda.com>2014-04-19 17:28:47 +0500
committerSunil Nimmagadda <sunil@sunilnimmagadda.com>2014-04-19 17:28:47 +0500
commit88462e90c807b1a0da16f79aa753b4b0e32dfe74 (patch)
tree44ced88b1cc0af7fc8a371b97afb5f73c459e5aa /maildrop.c
parent75e570fbf7096d543a4970ae995dea3438936ba3 (diff)
hash is a fixed length string. Copying is always done to same length
buffer. Explicitly cast to void for clarity.
Diffstat (limited to 'maildrop.c')
-rw-r--r--maildrop.c10
1 files 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;