mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
locking: Remove unnecessary setting of lockspace
In virLockSpaceProtocolDispatchNew() the returned value of lockspace from virLockDaemonFindLockSpace() is overwritten by the virLockSpaceNew() return. Coverity complains that it's unused. In virLockSpaceProtocolDispatchCreateLockSpace() lockspace is also overwritten in a similar manner resulting in the same Coverity message.
This commit is contained in:
parent
a75d762fcd
commit
e8cd571b2c
@ -227,7 +227,7 @@ virLockSpaceProtocolDispatchNew(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((lockspace = virLockDaemonFindLockSpace(lockDaemon, args->path))) {
|
||||
if (virLockDaemonFindLockSpace(lockDaemon, args->path) != NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Lockspace for path %s already exists"),
|
||||
args->path);
|
||||
@ -406,7 +406,7 @@ virLockSpaceProtocolDispatchCreateLockSpace(virNetServerPtr server ATTRIBUTE_UNU
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((lockspace = virLockDaemonFindLockSpace(lockDaemon, args->path))) {
|
||||
if (virLockDaemonFindLockSpace(lockDaemon, args->path) != NULL) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
_("Lockspace for path %s already exists"),
|
||||
args->path);
|
||||
|
Loading…
Reference in New Issue
Block a user