Use g_strdup instead of standard strdup

The remaining codebase uses g_strdup() already so do the same for the
chime command too. This fixes a gcc warning caused by a missing include
for strdup().
This commit is contained in:
Stefan Gehn 2013-12-16 12:59:22 +01:00
parent cfc573790e
commit b9f24e8c80
1 changed files with 2 additions and 2 deletions

View File

@ -477,7 +477,7 @@ update_clock(void)
if (!chime_block && hour_chime_command && *hour_chime_command) if (!chime_block && hour_chime_command && *hour_chime_command)
{ {
chime = g_new0(ChimeData, 1); chime = g_new0(ChimeData, 1);
chime -> command = strdup(hour_chime_command); chime -> command = g_strdup(hour_chime_command);
chime -> count = loop_chime_enable ? ptm->tm_hour : 1; chime -> count = loop_chime_enable ? ptm->tm_hour : 1;
g_thread_create(chime_func, chime, FALSE, NULL); g_thread_create(chime_func, chime, FALSE, NULL);
} }
@ -489,7 +489,7 @@ update_clock(void)
) )
{ {
chime = g_new0(ChimeData, 1); chime = g_new0(ChimeData, 1);
chime -> command = strdup(quarter_chime_command); chime -> command = g_strdup(quarter_chime_command);
chime -> count = 1; chime -> count = 1;
g_thread_create(chime_func, chime, FALSE, NULL); g_thread_create(chime_func, chime, FALSE, NULL);
} }