From 4006528c1a7877977ef3d14d322420471235f542 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 26 Oct 2020 23:07:07 +0100 Subject: Set sockets to invalid value on init --- gdbstub/gdbstub_sys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdbstub') diff --git a/gdbstub/gdbstub_sys.c b/gdbstub/gdbstub_sys.c index ca8dd2db..ef81bd2d 100644 --- a/gdbstub/gdbstub_sys.c +++ b/gdbstub/gdbstub_sys.c @@ -14,10 +14,10 @@ #include static pthread_t thread; -static mqd_t in_queue, out_queue; +static mqd_t in_queue = -1, out_queue = -1; #endif -static int server_socket, client_socket; +static int server_socket = -1, client_socket = -1; static enum { PAUSED, } state; @@ -336,7 +336,7 @@ static void stop_thread(void) #ifdef _POSIX_VERSION void gdbstub_sys_recv(struct msg *msg) { - while (out_queue <= 0) + while (out_queue < 0) ; { -- cgit v1.2.3