diff options
author | Marc-André Lureau | 2022-03-04 14:27:00 +0100 |
---|---|---|
committer | Marc-André Lureau | 2022-03-22 11:39:06 +0100 |
commit | 8ef2513d87ebe525540fb23a9c170da58871665c (patch) | |
tree | ae81924c58fe33f0efe366921e4bdcfac2f9cae0 /target/nios2 | |
parent | vl: typo fix in a comment (diff) | |
download | qemu-8ef2513d87ebe525540fb23a9c170da58871665c.tar.gz qemu-8ef2513d87ebe525540fb23a9c170da58871665c.tar.xz qemu-8ef2513d87ebe525540fb23a9c170da58871665c.zip |
m68k/nios2-semi: fix gettimeofday() result check
gettimeofday() returns 0 for success.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/nios2')
-rw-r--r-- | target/nios2/nios2-semi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index fe5598bae4..5a7ad0c710 100644 --- a/target/nios2/nios2-semi.c +++ b/target/nios2/nios2-semi.c @@ -403,7 +403,7 @@ void do_nios2_semihosting(CPUNios2State *env) qemu_timeval tv; struct gdb_timeval *p; result = qemu_gettimeofday(&tv); - if (result != 0) { + if (result == 0) { p = lock_user(VERIFY_WRITE, arg0, sizeof(struct gdb_timeval), 0); if (!p) { |