mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
virHashAtomicNew: Remove 'size' argument
Use 'virHashNew' internally which uses a default size. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
07780553f6
commit
c28b680579
@ -5743,7 +5743,7 @@ qemuMigrationDstErrorFree(void *data)
|
|||||||
int
|
int
|
||||||
qemuMigrationDstErrorInit(virQEMUDriverPtr driver)
|
qemuMigrationDstErrorInit(virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
driver->migrationErrors = virHashAtomicNew(64, qemuMigrationDstErrorFree);
|
driver->migrationErrors = virHashAtomicNew(qemuMigrationDstErrorFree);
|
||||||
if (driver->migrationErrors)
|
if (driver->migrationErrors)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
@ -212,8 +212,7 @@ virHashTablePtr virHashCreate(ssize_t size, virHashDataFree dataFree)
|
|||||||
|
|
||||||
|
|
||||||
virHashAtomicPtr
|
virHashAtomicPtr
|
||||||
virHashAtomicNew(ssize_t size,
|
virHashAtomicNew(virHashDataFree dataFree)
|
||||||
virHashDataFree dataFree)
|
|
||||||
{
|
{
|
||||||
virHashAtomicPtr hash;
|
virHashAtomicPtr hash;
|
||||||
|
|
||||||
@ -223,7 +222,7 @@ virHashAtomicNew(ssize_t size,
|
|||||||
if (!(hash = virObjectLockableNew(virHashAtomicClass)))
|
if (!(hash = virObjectLockableNew(virHashAtomicClass)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!(hash->hash = virHashCreate(size, dataFree))) {
|
if (!(hash->hash = virHashNew(dataFree))) {
|
||||||
virObjectUnref(hash);
|
virObjectUnref(hash);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -114,8 +114,7 @@ typedef void (*virHashKeyFree)(void *name);
|
|||||||
virHashTablePtr virHashNew(virHashDataFree dataFree);
|
virHashTablePtr virHashNew(virHashDataFree dataFree);
|
||||||
virHashTablePtr virHashCreate(ssize_t size,
|
virHashTablePtr virHashCreate(ssize_t size,
|
||||||
virHashDataFree dataFree);
|
virHashDataFree dataFree);
|
||||||
virHashAtomicPtr virHashAtomicNew(ssize_t size,
|
virHashAtomicPtr virHashAtomicNew(virHashDataFree dataFree);
|
||||||
virHashDataFree dataFree);
|
|
||||||
virHashTablePtr virHashCreateFull(ssize_t size,
|
virHashTablePtr virHashCreateFull(ssize_t size,
|
||||||
virHashDataFree dataFree,
|
virHashDataFree dataFree,
|
||||||
virHashKeyCode keyCode,
|
virHashKeyCode keyCode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user