tools/xenstored: Remove redundant check in socket_can_process()
authorJulien Grall <jgrall@amazon.com>
Thu, 24 Jun 2021 14:55:03 +0000 (15:55 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 24 Jun 2021 14:55:49 +0000 (15:55 +0100)
Commit 3adfb50315d9 ("tools/xenstored: Introduce a wrapper for
conn->funcs->can_{read, write}") consolidated the check
!conn->is_ignored in two new wrappers.

This means the check in socket_can_process() is now redundant. In
fact it should have been removed in orignal commit (as it was done
for the domain helpers).

Reported-by: Raphael Ning <raphning@amazon.com
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/xenstore/xenstored_core.c

index 9ffd2ac66d3eb4d0b6b983fc32d5448d6af4bf15..cf7297a96cb10acb2c667ce57abc95e5fc5055f9 100644 (file)
@@ -1752,7 +1752,7 @@ static bool socket_can_process(struct connection *conn, int mask)
                return false;
        }
 
-       return (fds[conn->pollfd_idx].revents & mask) && !conn->is_ignored;
+       return (fds[conn->pollfd_idx].revents & mask);
 }
 
 static bool socket_can_write(struct connection *conn)