Fix typo near get_new_basename
And clear op the function a bit.
This commit is contained in:
@ -750,7 +750,6 @@ mu_maildir_get_maildir_from_path (const char* path)
|
|||||||
static char*
|
static char*
|
||||||
get_new_basename (void)
|
get_new_basename (void)
|
||||||
{
|
{
|
||||||
time_t now;
|
|
||||||
char hostname[64];
|
char hostname[64];
|
||||||
|
|
||||||
if (gethostname (hostname, sizeof(hostname)) == -1)
|
if (gethostname (hostname, sizeof(hostname)) == -1)
|
||||||
@ -758,15 +757,13 @@ get_new_basename (void)
|
|||||||
else
|
else
|
||||||
hostname[sizeof(hostname)-1] = '\0';
|
hostname[sizeof(hostname)-1] = '\0';
|
||||||
|
|
||||||
now = time(NULL);
|
|
||||||
|
|
||||||
return g_strdup_printf ("%u.%08x%08x.%s",
|
return g_strdup_printf ("%u.%08x%08x.%s",
|
||||||
(guint)now,
|
(guint)time(NULL),
|
||||||
g_random_int(),
|
g_random_int(),
|
||||||
(gint32)g_get_monotonic_time (),
|
(gint32)g_get_monotonic_time (),
|
||||||
hostname);
|
hostname);
|
||||||
}
|
}
|
||||||
g
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
mu_maildir_get_new_path (const char *oldpath, const char *new_mdir,
|
mu_maildir_get_new_path (const char *oldpath, const char *new_mdir,
|
||||||
|
|||||||
Reference in New Issue
Block a user