diff options
author | Tarek BOCHKATI <tarek.bouchkati@gmail.com> | 2020-04-06 13:41:36 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2020-04-13 17:52:06 +0100 |
commit | e7f9ad3932105928cb9aaf6041590be396243402 (patch) | |
tree | 37192c99202e82f4386f73763261cf6328821cbb /src/server | |
parent | ef6eb5691aaaa3b13dccfff4a180b745803ae10b (diff) | |
download | riscv-openocd-e7f9ad3932105928cb9aaf6041590be396243402.zip riscv-openocd-e7f9ad3932105928cb9aaf6041590be396243402.tar.gz riscv-openocd-e7f9ad3932105928cb9aaf6041590be396243402.tar.bz2 |
server: set connection::input_pending type to bool
Change-Id: Ifae8ac2761a7a8fa12732b71c2de456e7558bd2b
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5565
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 8 | ||||
-rw-r--r-- | src/server/server.c | 2 | ||||
-rw-r--r-- | src/server/server.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 857cffd..6f326fe 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -277,9 +277,9 @@ static int gdb_get_char_inner(struct connection *connection, int *next_char) gdb_con->buf_cnt--; *next_char = *(gdb_con->buf_p++); if (gdb_con->buf_cnt > 0) - connection->input_pending = 1; + connection->input_pending = true; else - connection->input_pending = 0; + connection->input_pending = false; #ifdef _DEBUG_GDB_IO_ LOG_DEBUG("returned char '%c' (0x%2.2x)", *next_char, *next_char); #endif @@ -302,9 +302,9 @@ static inline int gdb_get_char_fast(struct connection *connection, *next_char = **buf_p; (*buf_p)++; if (*buf_cnt > 0) - connection->input_pending = 1; + connection->input_pending = true; else - connection->input_pending = 0; + connection->input_pending = false; #ifdef _DEBUG_GDB_IO_ LOG_DEBUG("returned char '%c' (0x%2.2x)", *next_char, *next_char); diff --git a/src/server/server.c b/src/server/server.c index 8e64117..f32a9c7 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -76,7 +76,7 @@ static int add_connection(struct service *service, struct command_context *cmd_c memset(&c->sin, 0, sizeof(c->sin)); c->cmd_ctx = copy_command_context(cmd_ctx); c->service = service; - c->input_pending = 0; + c->input_pending = false; c->priv = NULL; c->next = NULL; diff --git a/src/server/server.h b/src/server/server.h index 96e0b48..ab9b72f 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -49,7 +49,7 @@ struct connection { struct sockaddr_in sin; struct command_context *cmd_ctx; struct service *service; - int input_pending; + bool input_pending; void *priv; struct connection *next; }; |