linux-user: Use macro TARGET_NSIG_WORDS were possible
PATCH 1/1 linux-user: Use macro TARGET_NSIG_WORDS were possible
This improves readability and simplifies the code.
Signed-off-by Stefan Weil <[email protected]>
--- linux-user/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
linux-user/signal.c +4 -4
@@ -2537,9 +2537,9 @@ void sparc64_set_context(CPUSPARCState *env)abi_ulong *src, *dst; src = ucp->tuc_sigmask.sig; dst = target_set.sig; -for (i =0 ; i <sizeof (target_sigset_t) /sizeof (abi_ulong); - i++, dst++, src++) +for (i =0 ; i <TARGET_NSIG_WORDS ; i++, dst++, src++) { err |=__get_user (*dst, src); + }if (err) goto do_sigsegv; }
@@ -2642,9 +2642,9 @@ void sparc64_get_context(CPUSPARCState *env)abi_ulong *src, *dst; src = target_set.sig; dst = ucp->tuc_sigmask.sig; -for (i =0 ; i <sizeof (target_sigset_t) /sizeof (abi_ulong); - i++, dst++, src++) +for (i =0 ; i <TARGET_NSIG_WORDS ; i++, dst++, src++) { err |=__put_user (*src, dst); + }if (err) goto do_sigsegv; }
Signature · 1 line
1.7.10.4