summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/generic/mboxstorage.c
Side-by-side diff
Diffstat (limited to 'kmicromail/libetpan/generic/mboxstorage.c') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libetpan/generic/mboxstorage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libetpan/generic/mboxstorage.c b/kmicromail/libetpan/generic/mboxstorage.c
index 0a7dc93..4b55b2b 100644
--- a/kmicromail/libetpan/generic/mboxstorage.c
+++ b/kmicromail/libetpan/generic/mboxstorage.c
@@ -44,49 +44,49 @@
#include <stdlib.h>
#include <string.h>
/* mbox storage */
static int mbox_mailstorage_connect(struct mailstorage * storage);
static int
mbox_mailstorage_get_folder_session(struct mailstorage * storage,
char * pathname, mailsession ** result);
static void mbox_mailstorage_uninitialize(struct mailstorage * storage);
static mailstorage_driver mbox_mailstorage_driver = {
.sto_name = "mbox",
.sto_connect = mbox_mailstorage_connect,
.sto_get_folder_session = mbox_mailstorage_get_folder_session,
.sto_uninitialize = mbox_mailstorage_uninitialize,
};
int mbox_mailstorage_init(struct mailstorage * storage,
char * mbox_pathname, int mbox_cached,
char * mbox_cache_directory, char * mbox_flags_directory)
{
struct mbox_mailstorage * mbox_storage;
- mbox_storage = malloc(sizeof(struct mbox_mailstorage));
+ mbox_storage = malloc(sizeof(* mbox_storage));
if (mbox_storage == NULL)
goto err;
mbox_storage->mbox_pathname = strdup(mbox_pathname);
if (mbox_storage->mbox_pathname == NULL)
goto free;
mbox_storage->mbox_cached = mbox_cached;
if (mbox_cached && (mbox_cache_directory != NULL) &&
(mbox_flags_directory != NULL)) {
mbox_storage->mbox_cache_directory = strdup(mbox_cache_directory);
if (mbox_storage->mbox_cache_directory == NULL)
goto free_pathname;
mbox_storage->mbox_flags_directory = strdup(mbox_flags_directory);
if (mbox_storage->mbox_flags_directory == NULL)
goto free_cache_directory;
}
else {
mbox_storage->mbox_cached = FALSE;
mbox_storage->mbox_cache_directory = NULL;
mbox_storage->mbox_flags_directory = NULL;
}