mirror of https://gitee.com/openkylin/libvirt.git
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:
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…
Reference in New Issue