VIR_APPEND_ELEMENT_INPLACE and VIR_APPEND_ELEMENT_COPY_INPLACE already ignore the return value from 'virInsertElementsN' which allows a trivial conversion to virAppendElement without the need for 'ignore_value'. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/util/viralloc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index 7669b12e89..7397ee3771 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -237,13 +237,13 @@ int virDeleteElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr, virInsertElementsN(&(ptr), sizeof(*(ptr)), -1, &(count), \ VIR_TYPEMATCH(ptr, &(newelem)), &(newelem), false, false) #define VIR_APPEND_ELEMENT_INPLACE(ptr, count, newelem) \ - ignore_value(virInsertElementsN(&(ptr), sizeof(*(ptr)), -1, &(count), \ - VIR_TYPEMATCH(ptr, &(newelem)), \ - &(newelem), true, true)) + virAppendElement(&(ptr), sizeof(*(ptr)), &(count), \ + VIR_TYPEMATCH(ptr, &(newelem)), \ + &(newelem), true, true) #define VIR_APPEND_ELEMENT_COPY_INPLACE(ptr, count, newelem) \ - ignore_value(virInsertElementsN(&(ptr), sizeof(*(ptr)), -1, &(count), \ - VIR_TYPEMATCH(ptr, &(newelem)), \ - &(newelem), false, true)) + virAppendElement(&(ptr), sizeof(*(ptr)), &(count), \ + VIR_TYPEMATCH(ptr, &(newelem)), \ + &(newelem), false, true) /* Quiet version of macros above */ #define VIR_APPEND_ELEMENT_QUIET(ptr, count, newelem) \ -- 2.31.1