summaryrefslogtreecommitdiffstats
path: root/arch/sandbox
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2007-11-28 10:05:47 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2007-11-28 10:05:47 +0100
commitbe57231bc883fa5772c5470b26ab4ea4ce65bea1 (patch)
tree7cc5e7e8a78079a505ff164eb902bdd392573f0e /arch/sandbox
parent66671b505fe21017494e2f5a30929cb942d48111 (diff)
downloadbarebox-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')
-rw-r--r--arch/sandbox/lib/common.c9
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
+ */