Use 'virHashNew' internally which uses a default size. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_migration.c | 2 +- src/util/virhash.c | 5 ++--- src/util/virhash.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index e18216824c..2f5d61f8e7 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -5743,7 +5743,7 @@ qemuMigrationDstErrorFree(void *data) int qemuMigrationDstErrorInit(virQEMUDriverPtr driver) { - driver->migrationErrors = virHashAtomicNew(64, qemuMigrationDstErrorFree); + driver->migrationErrors = virHashAtomicNew(qemuMigrationDstErrorFree); if (driver->migrationErrors) return 0; else diff --git a/src/util/virhash.c b/src/util/virhash.c index 7dd2d9f81d..23e12e0255 100644 --- a/src/util/virhash.c +++ b/src/util/virhash.c @@ -212,8 +212,7 @@ virHashTablePtr virHashCreate(ssize_t size, virHashDataFree dataFree) virHashAtomicPtr -virHashAtomicNew(ssize_t size, - virHashDataFree dataFree) +virHashAtomicNew(virHashDataFree dataFree) { virHashAtomicPtr hash; @@ -223,7 +222,7 @@ virHashAtomicNew(ssize_t size, if (!(hash = virObjectLockableNew(virHashAtomicClass))) return NULL; - if (!(hash->hash = virHashCreate(size, dataFree))) { + if (!(hash->hash = virHashNew(dataFree))) { virObjectUnref(hash); return NULL; } diff --git a/src/util/virhash.h b/src/util/virhash.h index 37853aba36..baf92996a3 100644 --- a/src/util/virhash.h +++ b/src/util/virhash.h @@ -114,8 +114,7 @@ typedef void (*virHashKeyFree)(void *name); virHashTablePtr virHashNew(virHashDataFree dataFree); virHashTablePtr virHashCreate(ssize_t size, virHashDataFree dataFree); -virHashAtomicPtr virHashAtomicNew(ssize_t size, - virHashDataFree dataFree); +virHashAtomicPtr virHashAtomicNew(virHashDataFree dataFree); virHashTablePtr virHashCreateFull(ssize_t size, virHashDataFree dataFree, virHashKeyCode keyCode, -- 2.26.2