Do not check return value of VIR_REALLOC_N

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Jiri Denemark
2021-03-20 00:37:05 +01:00
parent 52ef4a9af2
commit 1107c0b9c3
41 changed files with 96 additions and 205 deletions

View File

@@ -2582,8 +2582,7 @@ vshReadlineCommandGenerator(void)
if (cmds[cmd_list_index].flags & VSH_CMD_FLAG_ALIAS)
continue;
if (VIR_REALLOC_N(ret, ret_size + 2) < 0)
return NULL;
VIR_REALLOC_N(ret, ret_size + 2);
ret[ret_size] = g_strdup(name);
ret_size++;
@@ -2630,8 +2629,7 @@ vshReadlineOptionsGenerator(const vshCmdDef *cmd,
if (exists)
continue;
if (VIR_REALLOC_N(ret, ret_size + 2) < 0)
return NULL;
VIR_REALLOC_N(ret, ret_size + 2);
ret[ret_size] = g_strdup_printf("--%s", name);
ret_size++;