diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2019-12-20 23:40:07 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2020-01-16 09:44:49 +0000 |
commit | 98a8b99ef37542dc34e1b247d9946a127d4ab70d (patch) | |
tree | e2ab17beb36eaeb6805c77f6bff8cd3c69dbdd97 /src | |
parent | 35d9bf9917fc9c00a6b8e941a5479e85878ef33c (diff) |
server/server: fix clang static analyzer warning
Change-Id: I317e189b62540e3688a20d88a95f551280317f14
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5373
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/server/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/server.c b/src/server/server.c index 9e63f74f..8e641176 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -562,7 +562,7 @@ int server_loop(struct command_context *command_context) struct connection *c; for (c = service->connections; c; ) { - if ((FD_ISSET(c->fd, &read_fds)) || c->input_pending) { + if ((c->fd >= 0 && FD_ISSET(c->fd, &read_fds)) || c->input_pending) { retval = service->input(c); if (retval != ERROR_OK) { struct connection *next = c->next; |