aboutsummaryrefslogtreecommitdiff
path: root/os-win32.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 /os-win32.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
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 'os-win32.c')
-rw-r--r--os-win32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os-win32.c b/os-win32.c
index b6652af7f3..d3cea42a50 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -41,7 +41,7 @@ int setenv(const char *name, const char *value, int overwrite)
int result = 0;
if (overwrite || !getenv(name)) {
size_t length = strlen(name) + strlen(value) + 2;
- char *string = qemu_malloc(length);
+ char *string = g_malloc(length);
snprintf(string, length, "%s=%s", name, value);
result = putenv(string);
}
@@ -62,7 +62,7 @@ static PollingEntry *first_polling_entry;
int qemu_add_polling_cb(PollingFunc *func, void *opaque)
{
PollingEntry **ppe, *pe;
- pe = qemu_mallocz(sizeof(PollingEntry));
+ pe = g_malloc0(sizeof(PollingEntry));
pe->func = func;
pe->opaque = opaque;
for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next);
@@ -77,7 +77,7 @@ void qemu_del_polling_cb(PollingFunc *func, void *opaque)
pe = *ppe;
if (pe->func == func && pe->opaque == opaque) {
*ppe = pe->next;
- qemu_free(pe);
+ g_free(pe);
break;
}
}
@@ -218,7 +218,7 @@ char *os_find_datadir(const char *argv0)
p--;
*p = 0;
if (access(buf, R_OK) == 0) {
- return qemu_strdup(buf);
+ return g_strdup(buf);
}
return NULL;
}