dovecot-2.1: lib-storage: Removed unused struct stat parameter f...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 12 12:02:48 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/896ed71917aa
changeset: 13441:896ed71917aa
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 12 12:02:33 2011 +0300
description:
lib-storage: Removed unused struct stat parameter from mailbox_list.get_mailbox_flags()
diffstat:
src/lib-storage/list/mailbox-list-fs-iter.c | 3 +--
src/lib-storage/list/mailbox-list-maildir-iter.c | 9 ++-------
src/lib-storage/list/mailbox-list-maildir.h | 1 -
src/lib-storage/list/mailbox-list-none.c | 1 -
src/lib-storage/mailbox-list-private.h | 1 -
src/lib-storage/mailbox-list.c | 3 +--
6 files changed, 4 insertions(+), 14 deletions(-)
diffs (129 lines):
diff -r 3e1aad7bfd97 -r 896ed71917aa src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c Fri Sep 09 13:14:07 2011 +0300
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c Mon Sep 12 12:02:33 2011 +0300
@@ -523,7 +523,6 @@
const char *fname = entry->fname;
const char *list_path, *root_dir;
enum imap_match_result match;
- struct stat st;
int ret;
/* skip . and .. */
@@ -556,7 +555,7 @@
/* get the info.flags using callback */
ret = ctx->ctx.list->v.
get_mailbox_flags(ctx->ctx.list, ctx->dir->real_path, fname,
- entry->type, &st, &ctx->info.flags);
+ entry->type, &ctx->info.flags);
if (ret <= 0)
return ret;
diff -r 3e1aad7bfd97 -r 896ed71917aa src/lib-storage/list/mailbox-list-maildir-iter.c
--- a/src/lib-storage/list/mailbox-list-maildir-iter.c Fri Sep 09 13:14:07 2011 +0300
+++ b/src/lib-storage/list/mailbox-list-maildir-iter.c Mon Sep 12 12:02:33 2011 +0300
@@ -150,7 +150,6 @@
static bool
maildir_get_type(const char *dir, const char *fname,
enum mailbox_list_file_type *type_r,
- struct stat *st_r,
enum mailbox_info_flags *flags)
{
const char *path;
@@ -168,7 +167,6 @@
return FALSE;
}
- *st_r = st;
if (S_ISDIR(st.st_mode)) {
*type_r = MAILBOX_LIST_FILE_TYPE_DIR;
return TRUE;
@@ -184,10 +182,8 @@
int maildir_list_get_mailbox_flags(struct mailbox_list *list,
const char *dir, const char *fname,
enum mailbox_list_file_type type,
- struct stat *st_r,
enum mailbox_info_flags *flags_r)
{
- memset(st_r, 0, sizeof(*st_r));
*flags_r = 0;
switch (type) {
@@ -205,7 +201,7 @@
return 1;
}
- if (!maildir_get_type(dir, fname, &type, st_r, flags_r))
+ if (!maildir_get_type(dir, fname, &type, flags_r))
return 0;
break;
}
@@ -272,7 +268,6 @@
enum imap_match_result match;
struct mailbox_node *node;
bool created;
- struct stat st;
int ret;
fname = d->d_name;
@@ -302,7 +297,7 @@
T_BEGIN {
ret = list->v.get_mailbox_flags(list, ctx->dir, fname,
- mailbox_list_get_file_type(d), &st, &flags);
+ mailbox_list_get_file_type(d), &flags);
} T_END;
if (ret <= 0)
return ret;
diff -r 3e1aad7bfd97 -r 896ed71917aa src/lib-storage/list/mailbox-list-maildir.h
--- a/src/lib-storage/list/mailbox-list-maildir.h Fri Sep 09 13:14:07 2011 +0300
+++ b/src/lib-storage/list/mailbox-list-maildir.h Mon Sep 12 12:02:33 2011 +0300
@@ -28,7 +28,6 @@
int maildir_list_get_mailbox_flags(struct mailbox_list *list,
const char *dir, const char *fname,
enum mailbox_list_file_type type,
- struct stat *st_r,
enum mailbox_info_flags *flags);
#endif
diff -r 3e1aad7bfd97 -r 896ed71917aa src/lib-storage/list/mailbox-list-none.c
--- a/src/lib-storage/list/mailbox-list-none.c Fri Sep 09 13:14:07 2011 +0300
+++ b/src/lib-storage/list/mailbox-list-none.c Mon Sep 12 12:02:33 2011 +0300
@@ -176,7 +176,6 @@
const char *dir ATTR_UNUSED,
const char *fname ATTR_UNUSED,
enum mailbox_list_file_type type ATTR_UNUSED,
- struct stat *st_r ATTR_UNUSED,
enum mailbox_info_flags *flags)
{
*flags = MAILBOX_NONEXISTENT;
diff -r 3e1aad7bfd97 -r 896ed71917aa src/lib-storage/mailbox-list-private.h
--- a/src/lib-storage/mailbox-list-private.h Fri Sep 09 13:14:07 2011 +0300
+++ b/src/lib-storage/mailbox-list-private.h Mon Sep 12 12:02:33 2011 +0300
@@ -66,7 +66,6 @@
int (*get_mailbox_flags)(struct mailbox_list *list,
const char *dir, const char *fname,
enum mailbox_list_file_type type,
- struct stat *st_r,
enum mailbox_info_flags *flags_r);
/* Returns TRUE if name is mailbox's internal file/directory.
If it does, mailbox deletion assumes it can safely delete it. */
diff -r 3e1aad7bfd97 -r 896ed71917aa src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c Fri Sep 09 13:14:07 2011 +0300
+++ b/src/lib-storage/mailbox-list.c Mon Sep 12 12:02:33 2011 +0300
@@ -1282,7 +1282,6 @@
enum mailbox_info_flags *flags_r)
{
const char *path, *fname, *rootdir, *dir, *inbox;
- struct stat st;
unsigned int len;
*flags_r = 0;
@@ -1356,7 +1355,7 @@
}
return list->v.get_mailbox_flags(list, dir, fname,
MAILBOX_LIST_FILE_TYPE_UNKNOWN,
- &st, flags_r);
+ flags_r);
}
static bool mailbox_list_init_changelog(struct mailbox_list *list)
More information about the dovecot-cvs
mailing list