trace/simple: Replace asprintf by g_strdup_printf
authorStefan Weil <sw@weilnetz.de>
Mon, 13 Aug 2012 19:51:16 +0000 (21:51 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Tue, 14 Aug 2012 12:19:57 +0000 (13:19 +0100)
commit4552e41025af4694c55854448c3ae4d95e72c7f6
treec8af479920fd9a04cbeb6dba2b21d1eddf0c3c67
parent964d0a7b2bab935d48d3b2c4d6ab9b0efc74ce8b
trace/simple: Replace asprintf by g_strdup_printf

asprintf is not available for all hosts. g_strdup_printf is
more portable and simplifies the code because if does not
need error handling.

The static variable does not need an explicit assignment to be NULL.

Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
trace/simple.c