aboutsummaryrefslogtreecommitdiff
path: root/qemu-timer.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /qemu-timer.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-timer.c')
-rw-r--r--qemu-timer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index 30e8f12..19313d3 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -327,7 +327,7 @@ void configure_alarms(char const *opt)
exit(0);
}
- arg = qemu_strdup(opt);
+ arg = g_strdup(opt);
/* Reorder the array */
name = strtok(arg, ",");
@@ -356,7 +356,7 @@ next:
name = strtok(NULL, ",");
}
- qemu_free(arg);
+ g_free(arg);
if (cur) {
/* Disable remaining timers */
@@ -380,7 +380,7 @@ static QEMUClock *qemu_new_clock(int type)
{
QEMUClock *clock;
- clock = qemu_mallocz(sizeof(QEMUClock));
+ clock = g_malloc0(sizeof(QEMUClock));
clock->type = type;
clock->enabled = 1;
notifier_list_init(&clock->reset_notifiers);
@@ -485,7 +485,7 @@ QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
{
QEMUTimer *ts;
- ts = qemu_mallocz(sizeof(QEMUTimer));
+ ts = g_malloc0(sizeof(QEMUTimer));
ts->clock = clock;
ts->cb = cb;
ts->opaque = opaque;
@@ -495,7 +495,7 @@ QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
void qemu_free_timer(QEMUTimer *ts)
{
- qemu_free(ts);
+ g_free(ts);
}
/* stop a timer, but do not dealloc it */