aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/signal.c
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2007-03-08 16:46:16 -0500
committerDaniel Franke <dfranke@gcc.gnu.org>2007-03-08 16:46:16 -0500
commit02330e1953b4b407eb37facb3f96585191b11655 (patch)
treeb27cd78d4f00e742212ffe4e854e65352ce4928e /libgfortran/intrinsics/signal.c
parent32af37843c42725d625ee9b4e0bb25273c701c9e (diff)
downloadgcc-02330e1953b4b407eb37facb3f96585191b11655.zip
gcc-02330e1953b4b407eb37facb3f96585191b11655.tar.gz
gcc-02330e1953b4b407eb37facb3f96585191b11655.tar.bz2
re PR fortran/30947 (intrinsic: ALARM)
2007-03-08 Daniel Franke <franke.daniel@gmail.com> PR fortran/30947 * intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with integer arguments. From-SVN: r122716
Diffstat (limited to 'libgfortran/intrinsics/signal.c')
-rw-r--r--libgfortran/intrinsics/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/intrinsics/signal.c b/libgfortran/intrinsics/signal.c
index e912c90..2c2f38d 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