diff options
-rw-r--r-- | arch/sandbox/lib/common.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/sandbox/lib/common.c b/arch/sandbox/lib/common.c index 0db4403219..e8f43177d1 100644 --- a/arch/sandbox/lib/common.c +++ b/arch/sandbox/lib/common.c @@ -85,8 +85,10 @@ void linux_putc(const char c) int linux_tstc(int fd) { + struct timeval tv = { + .tv_usec = 100, + }; fd_set rfds; - struct timeval tv; int ret; FD_ZERO(&rfds); @@ -99,9 +101,6 @@ int linux_tstc(int fd) * things like networking slow, because U-Boot will * poll this function very often. */ - tv.tv_sec = 0; - tv.tv_usec = 100; - ret = select(fd + 1, &rfds, NULL, NULL, &tv); if (ret) @@ -380,4 +379,4 @@ static void print_usage(const char *prgname) * * @section simu_dbg How to debug U-Boot simulator * - */
\ No newline at end of file + */ |