Skip to contentSkip to conversation

timespec convert funcs: return a value in the normal case

PATCH New Mike Frysinger 1 participant 1 message May 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 timespec convert funcs: return a value in the normal case

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.

---
 linux-user/syscall.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
linux-user/syscall.c +2 -0
index 0e506cc..5b88e62 100644
@@ -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)
Signature · 1 line
1.5.5.1