Move it closer to list.
authorSunil Nimmagadda <sunil@nimmagadda.net>
Wed, 02 Apr 2014 11:40:41 +0500
changeset 7 bb148c4cfe52
parent 6 c911413d912d
child 8 dd898f214ed7
Move it closer to list.
maildrop.c
--- a/maildrop.c	Tue Apr 01 20:24:49 2014 +0500
+++ b/maildrop.c	Wed Apr 02 11:40:41 2014 +0500
@@ -292,6 +292,19 @@
 }
 
 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)
 {
 	struct list_res	res;
@@ -326,19 +339,6 @@
 }
 
 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)
 {
 	fatalx("maildrop should never need an fd");