mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
build: silence coverity false positive
Coverity complained that infd could be -1 at the point where it is passed to write, when in reality, this code can only be reached if infd is non-negative. * src/util/command.c (virCommandProcessIO): Help out coverity.
This commit is contained in:
parent
d391661ae4
commit
89e651fa76
@ -961,6 +961,9 @@ virCommandProcessIO(virCommandPtr cmd)
|
|||||||
} else {
|
} else {
|
||||||
int done;
|
int done;
|
||||||
|
|
||||||
|
/* Coverity 5.3.0 can't see that we only get here if
|
||||||
|
* infd is in the set because it was non-negative. */
|
||||||
|
sa_assert(infd != -1);
|
||||||
done = write(infd, cmd->inbuf + inoff,
|
done = write(infd, cmd->inbuf + inoff,
|
||||||
inlen - inoff);
|
inlen - inoff);
|
||||||
if (done < 0) {
|
if (done < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user