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>
This commit is contained in:
parent
35d9bf9917
commit
98a8b99ef3
|
@ -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…
Reference in New Issue