qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] timespec convert funcs: return a value in the normal case
Date: Sat, 10 May 2008 09:13:06 -0400	[thread overview]
Message-ID: <1210425186-4968-1-git-send-email-vapier@gentoo.org> (raw)

The target_to_host_timespec and host_to_target_timespec funcs lack a
"return" at the end of the functions which means random values may get
passed back in the successful case.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 linux-user/syscall.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 0e506cc..5b88e62 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3040,6 +3040,7 @@ static inline abi_long target_to_host_timespec(struct timespec *host_ts,
     host_ts->tv_sec = tswapl(target_ts->tv_sec);
     host_ts->tv_nsec = tswapl(target_ts->tv_nsec);
     unlock_user_struct(target_ts, target_addr, 0);
+    return 0;
 }
 
 static inline abi_long host_to_target_timespec(abi_ulong target_addr,
@@ -3052,6 +3053,7 @@ static inline abi_long host_to_target_timespec(abi_ulong target_addr,
     target_ts->tv_sec = tswapl(host_ts->tv_sec);
     target_ts->tv_nsec = tswapl(host_ts->tv_nsec);
     unlock_user_struct(target_ts, target_addr, 1);
+    return 0;
 }
 
 int get_osversion(void)
-- 
1.5.5.1

                 reply	other threads:[~2008-05-10 13:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210425186-4968-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).