diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-28 10:05:47 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-28 10:05:47 +0100 |
commit | be57231bc883fa5772c5470b26ab4ea4ce65bea1 (patch) | |
tree | 7cc5e7e8a78079a505ff164eb902bdd392573f0e /arch/sandbox/lib | |
parent | 66671b505fe21017494e2f5a30929cb942d48111 (diff) | |
download | barebox-be57231bc883fa5772c5470b26ab4ea4ce65bea1.tar.gz barebox-be57231bc883fa5772c5470b26ab4ea4ce65bea1.tar.xz |
[sandbox] use C99 initializers
This patch uses C99 initializers to initialize the timeout in linux_tstc()
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'arch/sandbox/lib')
-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 + */ |