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:
Ján Tomko 2020-09-22 22:29:25 +02:00
parent 8e12a0b8fa
commit 2e7849735f
1 changed files with 1 additions and 1 deletions

View File

@ -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;