From 24d1d985d4756f89540b9d6a6a916e36c91cecdf Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Wed, 2 Apr 2014 11:40:11 +0500 Subject: Move it closer to list. --- maildrop.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/maildrop.c b/maildrop.c index 4b9055c..f72e583 100644 --- a/maildrop.c +++ b/maildrop.c @@ -291,6 +291,19 @@ list(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb) } +static void +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); + return; + } + + *sz = m.msgs_index[idx]->sz; + strlcpy(hash, m.msgs_index[idx]->hash, hash_sz); +} + static void list_all(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb) { @@ -325,19 +338,6 @@ list_all(struct imsgev *iev, struct imsg *imsg, struct m_backend *mb) 0, -1, &res, sizeof(res), "maildrop_list"); } -static void -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); - return; - } - - *sz = m.msgs_index[idx]->sz; - strlcpy(hash, m.msgs_index[idx]->hash, hash_sz); -} - static void needfd(struct imsgev *iev) { -- cgit v1.2.3