The function can't fail so it's pointless to check its return value. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/util/virauthconfig.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/util/virauthconfig.c b/src/util/virauthconfig.c index 0363a1bef9..818df7a252 100644 --- a/src/util/virauthconfig.c +++ b/src/util/virauthconfig.c @@ -41,9 +41,7 @@ virAuthConfigNew(const char *path) g_autoptr(virAuthConfig) auth = g_new0(virAuthConfig, 1); auth->path = g_strdup(path); - - if (!(auth->keyfile = g_key_file_new())) - return NULL; + auth->keyfile = g_key_file_new(); if (!g_key_file_load_from_file(auth->keyfile, path, 0, NULL)) return NULL; @@ -60,9 +58,7 @@ virAuthConfigNewData(const char *path, g_autoptr(virAuthConfig) auth = g_new0(virAuthConfig, 1); auth->path = g_strdup(path); - - if (!(auth->keyfile = g_key_file_new())) - return NULL; + auth->keyfile = g_key_file_new(); if (!g_key_file_load_from_data(auth->keyfile, data, len, 0, NULL)) return NULL; -- 2.38.1