mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
rpc: socket: properly call virSetCloseExec
cppcheck reports:
style: Argument 'fd<0' to function virSetCloseExec is always 0 [knownArgument]
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 4b9919af40
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -1388,7 +1388,7 @@ int virNetSocketDupFD(virNetSocketPtr sock, bool cloexec)
|
||||
}
|
||||
#ifndef F_DUPFD_CLOEXEC
|
||||
if (cloexec &&
|
||||
virSetCloseExec(fd < 0)) {
|
||||
virSetCloseExec(fd) < 0) {
|
||||
int saveerr = errno;
|
||||
closesocket(fd);
|
||||
errno = saveerr;
|
||||
|
||||
Reference in New Issue
Block a user