diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-12-07 14:48:08 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-12-23 16:02:20 +0400 |
commit | 0d9e61c2619eeead4de6afa8fedec2ad9311b642 (patch) | |
tree | b429e493d1cf653435efda82a33094f0f10f75eb /linux-user/signal.c | |
parent | c46b07f0d7a826ea0bb5811dd49450c2497fb926 (diff) | |
download | qemu-0d9e61c2619eeead4de6afa8fedec2ad9311b642.zip qemu-0d9e61c2619eeead4de6afa8fedec2ad9311b642.tar.gz qemu-0d9e61c2619eeead4de6afa8fedec2ad9311b642.tar.bz2 |
linux-user: Use macro TARGET_NSIG_WORDS where possible
This improves readability and simplifies the code.
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r-- | linux-user/signal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index 4e7148a..0034c70 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -2539,9 +2539,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; } @@ -2644,9 +2644,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; } |