diff src/lib-storage/index/maildir/maildir-mail.c @ 4907:5b4c9b20eba0 HEAD

Replaced void *context from a lot of callbacks with the actual context type. Also added/fixed some context type checks.
author Timo Sirainen <tss@iki.fi>
date Fri, 15 Dec 2006 20:38:08 +0200
parents 5587c9345e39
children b6b2b1d98f42
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-mail.c	Fri Dec 15 20:10:51 2006 +0200
+++ b/src/lib-storage/index/maildir/maildir-mail.c	Fri Dec 15 20:38:08 2006 +0200
@@ -11,10 +11,8 @@
 #include <sys/stat.h>
 
 static int
-do_open(struct maildir_mailbox *mbox, const char *path, void *context)
+do_open(struct maildir_mailbox *mbox, const char *path, int *fd)
 {
-	int *fd = context;
-
 	*fd = open(path, O_RDONLY);
 	if (*fd != -1)
 		return 1;
@@ -27,10 +25,8 @@
 }
 
 static int
-do_stat(struct maildir_mailbox *mbox, const char *path, void *context)
+do_stat(struct maildir_mailbox *mbox, const char *path, struct stat *st)
 {
-	struct stat *st = context;
-
 	if (stat(path, st) == 0)
 		return 1;
 	if (errno == ENOENT)