mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
test: qemu: Fix error message when populating fd groups
The 'new->fds' array is not yet initialized at the point where the check if the FD is occupied happens so the error would always report that FD '0' is in use. Use 'new->testfds' instead. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
1 parent
59197dc16f
commit
c3af80575b
1 file changed
+1
-1
@@ -727,7 +727,7 @@ testQemuInfoSetArgs(testQemuInfo *info,
|
||||
new->testfds[i] = va_arg(argptr, unsigned int);
|
||||
|
||||
if (fcntl(new->testfds[i], F_GETFD) != -1) {
|
||||
fprintf(stderr, "fd '%d' is already in use\n", new->fds[i]);
|
||||
fprintf(stderr, "fd '%d' is already in use\n", new->testfds[i]);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user