From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Juosx-00020J-IE for qemu-devel@nongnu.org; Sat, 10 May 2008 09:13:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Juosw-0001zv-F4 for qemu-devel@nongnu.org; Sat, 10 May 2008 09:13:11 -0400 Received: from [199.232.76.173] (port=38952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Juosw-0001zp-8f for qemu-devel@nongnu.org; Sat, 10 May 2008 09:13:10 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:36410) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Juosv-0001O2-Uq for qemu-devel@nongnu.org; Sat, 10 May 2008 09:13:10 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B6106B404A for ; Sat, 10 May 2008 13:13:07 +0000 (UTC) From: Mike Frysinger Date: Sat, 10 May 2008 09:13:06 -0400 Message-Id: <1210425186-4968-1-git-send-email-vapier@gentoo.org> Subject: [Qemu-devel] [PATCH] timespec convert funcs: return a value in the normal case Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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