commit | c1efca4e479eb998b7db65314cd529c034438e14 | [log] [tgz] |
---|---|---|
author | Pali Rohár <pali@kernel.org> | Mon Oct 25 15:12:52 2021 +0200 |
committer | Stefan Roese <sr@denx.de> | Wed Nov 03 06:45:26 2021 +0100 |
tree | 2929969b648488ba5c1d3476e21bd33cf1b5e2ea | |
parent | ac2ee55752ab74ce53ab724df46972387d624f91 [diff] [blame] |
tools: kwboot: Initialize rfds to zero Explicitly zero out the rfds fd_set with FD_ZERO() before using it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
diff --git a/tools/kwboot.c b/tools/kwboot.c index 7e1be29..695d433 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c
@@ -1151,6 +1151,7 @@ fd_set rfds; int nfds = 0; + FD_ZERO(&rfds); FD_SET(tty, &rfds); nfds = nfds < tty ? tty : nfds;