aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qtest/libqtest.c')
-rw-r--r--tests/qtest/libqtest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 5c4a509..4f4b2d6 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -97,7 +97,7 @@ static int socket_accept(int sock)
(void *)&timeout, sizeof(timeout))) {
fprintf(stderr, "%s failed to set SO_RCVTIMEO: %s\n",
__func__, strerror(errno));
- close(sock);
+ closesocket(sock);
return -1;
}
@@ -108,7 +108,7 @@ static int socket_accept(int sock)
if (ret == -1) {
fprintf(stderr, "%s failed: %s\n", __func__, strerror(errno));
}
- close(sock);
+ closesocket(sock);
return ret;
}
@@ -421,8 +421,8 @@ void qtest_quit(QTestState *s)
qtest_remove_abrt_handler(s);
qtest_kill_qemu(s);
- close(s->fd);
- close(s->qmp_fd);
+ closesocket(s->fd);
+ closesocket(s->qmp_fd);
g_string_free(s->rx, true);
for (GList *it = s->pending_events; it != NULL; it = it->next) {