projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03a8a5e
)
tools: kwboot: Initialize rfds to zero
author
Pali Rohár
<pali@kernel.org>
Mon, 25 Oct 2021 13:12:52 +0000
(15:12 +0200)
committer
Stefan Roese
<sr@denx.de>
Wed, 3 Nov 2021 05:45:26 +0000
(06:45 +0100)
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>
tools/kwboot.c
patch
|
blob
|
history
diff --git
a/tools/kwboot.c
b/tools/kwboot.c
index 7e1be296230248622ae03da0f935f16931c24471..695d433b96ee3b178f7d535d3ae800d642773e22 100644
(file)
--- a/
tools/kwboot.c
+++ b/
tools/kwboot.c
@@
-1151,6
+1151,7
@@
kwboot_terminal(int tty)
fd_set rfds;
int nfds = 0;
+ FD_ZERO(&rfds);
FD_SET(tty, &rfds);
nfds = nfds < tty ? tty : nfds;