From 805c177c767110dc88afe8950d0f06b187f9e2a0 Mon Sep 17 00:00:00 2001 From: dfranke Date: Thu, 8 Mar 2007 21:46:16 +0000 Subject: 2007-03-08 Daniel Franke PR fortran/30947 * intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with integer arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122716 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/intrinsics/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libgfortran/intrinsics') diff --git a/libgfortran/intrinsics/signal.c b/libgfortran/intrinsics/signal.c index e912c90780e..2c2f38d2969 100644 --- a/libgfortran/intrinsics/signal.c +++ b/libgfortran/intrinsics/signal.c @@ -170,14 +170,14 @@ alarm_sub_int (int *seconds, int *handler, int *status) #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL) if (status != NULL) { - if (signal (SIGALRM, (void (*)(int)) handler) == SIG_ERR) + if (signal (SIGALRM, (void (*)(int)) *handler) == SIG_ERR) *status = -1; else *status = alarm (*seconds); } else { - signal (SIGALRM, (void (*)(int)) handler); + signal (SIGALRM, (void (*)(int)) *handler); alarm (*seconds); } #else -- cgit v1.2.1