Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx> --- src/locking/lock_driver_lockd.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index 339e2f6949..393154bb3c 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -140,7 +140,6 @@ virLockManagerLockDaemonConnectionRegister(virLockManagerPtr lock, { virLockManagerLockDaemonPrivatePtr priv = lock->privateData; virLockSpaceProtocolRegisterArgs args; - int rv = -1; memset(&args, 0, sizeof(args)); @@ -157,12 +156,9 @@ virLockManagerLockDaemonConnectionRegister(virLockManagerPtr lock, 0, NULL, NULL, NULL, (xdrproc_t)xdr_virLockSpaceProtocolRegisterArgs, (char*)&args, (xdrproc_t)xdr_void, NULL) < 0) - goto cleanup; - - rv = 0; + return -1; - cleanup: - return rv; + return 0; } @@ -173,7 +169,6 @@ virLockManagerLockDaemonConnectionRestrict(virLockManagerPtr lock G_GNUC_UNUSED, int *counter) { virLockSpaceProtocolRestrictArgs args; - int rv = -1; memset(&args, 0, sizeof(args)); @@ -186,12 +181,9 @@ virLockManagerLockDaemonConnectionRestrict(virLockManagerPtr lock G_GNUC_UNUSED, 0, NULL, NULL, NULL, (xdrproc_t)xdr_virLockSpaceProtocolRestrictArgs, (char*)&args, (xdrproc_t)xdr_void, NULL) < 0) - goto cleanup; - - rv = 0; + return -1; - cleanup: - return rv; + return 0; } -- 2.24.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list