]> Git Repo - qemu.git/blobdiff - util/path.c
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
[qemu.git] / util / path.c
index 4c5b0f62961284ac24bd244b94286c842d238110..f0c69627c7e8d1537e4a20642260fa2329e2768d 100644 (file)
@@ -47,10 +47,7 @@ static struct pathelem *new_entry(const char *root,
 {
     struct pathelem *new = malloc(sizeof(*new));
     new->name = strdup(name);
-    if (asprintf(&new->pathname, "%s/%s", root, name) == -1) {
-        printf("Cannot allocate memory\n");
-        exit(1);
-    }
+    new->pathname = g_strdup_printf("%s/%s", root, name);
     new->num_entries = 0;
     return new;
 }
This page took 0.020069 seconds and 4 git commands to generate.