Browse Source

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>
master
Tomas Vanek 4 years ago
parent
commit
98a8b99ef3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/server/server.c

+ 1
- 1
src/server/server.c View File

@@ -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;


Loading…
Cancel
Save