* fix some small issues

This commit is contained in:
Dirk-Jan C. Binnema
2011-05-09 09:20:27 +03:00
parent 53b87a79eb
commit 7aea532838
3 changed files with 18 additions and 19 deletions

View File

@ -33,11 +33,10 @@
#include "mu-maildir.h"
#include "mu-msg-priv.h"
static gboolean init_file_metadata (MuMsgFile *self, const char* path, const char *mdir,
GError **err);
static gboolean init_file_metadata (MuMsgFile *self, const char* path,
const char *mdir, GError **err);
static gboolean init_mime_msg (MuMsgFile *msg, GError **err);
#define CACHE(MFID) (self->_str_cache[(MFID)])
#define SET_CACHE(MFID,V)(self->_str_cache[(MFID)]=(V))
@ -50,6 +49,9 @@ mu_msg_file_new (const char* filepath, const char *mdir, GError **err)
g_return_val_if_fail (filepath, NULL);
self = g_slice_new0 (MuMsgFile);
for (i = 0; i != MU_MSG_FIELD_ID_NUM; ++i)
SET_CACHE(i,NULL);
if (!init_file_metadata (self, filepath, mdir, err)) {
mu_msg_file_destroy (self);
return NULL;
@ -59,9 +61,6 @@ mu_msg_file_new (const char* filepath, const char *mdir, GError **err)
mu_msg_file_destroy (self);
return NULL;
}
for (i = 0; i != MU_MSG_FIELD_ID_NUM; ++i)
SET_CACHE(i,NULL);
return self;
}