From 5b17ee167172f2afd3dd162587ad415f91f56265 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 24 Jun 2019 12:42:20 +0200 Subject: [PATCH] pmxcfs: get guest cfg properties: use g_string_sized_new While with NULL as first argument g_string_new_len effectively becomes a g_string_sized_new it can be confusing as the docs do not mention that. Also this may lead to an error if one changes the call with out to much research, so fix it to the one function we should used to begin with here. Signed-off-by: Thomas Lamprecht --- data/src/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/status.c b/data/src/status.c index d9650bd..67e6449 100644 --- a/data/src/status.c +++ b/data/src/status.c @@ -873,7 +873,7 @@ cfs_create_guest_conf_property_msg(GString *str, memdb_t *memdb, const char *pro goto ret; } - path = g_string_new_len(NULL, 256); + path = g_string_sized_new(256); if (vmid >= 100) { vminfo_t *vminfo = (vminfo_t *) g_hash_table_lookup(cfs_status.vmlist, &vmid); if (vminfo == NULL) goto enoent; -- 2.39.5