mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00: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: 4b9919af4024a6fbc3d4ee996d8a4c27dbc44285 Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
8e12a0b8fa
commit
2e7849735f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user