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
|
||||
qemuMigrationDstErrorInit(virQEMUDriverPtr driver)
|
||||
{
|
||||
driver->migrationErrors = virHashAtomicNew(64, qemuMigrationDstErrorFree);
|
||||
driver->migrationErrors = virHashAtomicNew(qemuMigrationDstErrorFree);
|
||||
if (driver->migrationErrors)
|
||||
return 0;
|
||||
else
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user