From d321df47c37c3fdceb2761cb52f9ab3bd9a95cb1 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 17 Dec 2002 19:13:03 +0000 Subject: [PATCH] Don't cast a pointer to (intptr_t) and then on to (int) when we cannot be sure that (int) is large enough. Instead cast only to (intptr_t) and cast the switch/case values to (intptr_t) as well. --- sys/kern/kern_sig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 35036098819d..a6ecbf834a6f 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1749,9 +1749,9 @@ issignal(td) * Return the signal's number, or fall through * to clear it from the pending mask. */ - switch ((int)(intptr_t)p->p_sigacts->ps_sigact[_SIG_IDX(sig)]) { + switch ((intptr_t)p->p_sigacts->ps_sigact[_SIG_IDX(sig)]) { - case (int)SIG_DFL: + case (intptr_t)SIG_DFL: /* * Don't take default actions on system processes. */ @@ -1810,7 +1810,7 @@ issignal(td) return (sig); /*NOTREACHED*/ - case (int)SIG_IGN: + case (intptr_t)SIG_IGN: /* * Masking above should prevent us ever trying * to take action on an ignored signal other