* mu-maildir.c: minor, cosmetic

This commit is contained in:
Dirk-Jan C. Binnema 2010-09-09 08:19:00 +03:00
parent 1a98b2de64
commit b4d7ea5a36
1 changed files with 8 additions and 4 deletions

View File

@ -440,16 +440,20 @@ process_dir_entry (const char* path,
static struct dirent*
dirent_copy (struct dirent *entry)
{
struct dirent *d = g_slice_new (struct dirent);
struct dirent *d;
/* NOTE: simply memcpy'ing sizeof(struct dirent) bytes will
* give memory errors*/
return (struct dirent*)memcpy (d, entry, entry->d_reclen);
* give memory errors. Also note, g_slice_new has been to
* crash on FreeBSD */
d = g_slice_new (struct dirent);
return (struct dirent*) memcpy (d, entry, entry->d_reclen);
}
static void
dirent_destroy (struct dirent *entry)
{
g_slice_free(struct dirent, entry);
g_slice_free (struct dirent, entry);
}
#ifdef HAVE_STRUCT_DIRENT_D_INO