From acf250891f7bc93c443eedd3cf13672d864b8ef3 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 28 Apr 2014 17:41:14 -0600 Subject: [PATCH] fix wrong size for memset Probably the assignments cover the structure, anyway. --- racket/src/racket/gc2/sighand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/racket/src/racket/gc2/sighand.c b/racket/src/racket/gc2/sighand.c index f93f5a066d..dff2fd510f 100644 --- a/racket/src/racket/gc2/sighand.c +++ b/racket/src/racket/gc2/sighand.c @@ -227,7 +227,7 @@ static void initialize_signal_handler(GCTYPE *gc) # ifdef NEED_SIGACTION { struct sigaction act, oact; - memset(&act, 0, sizeof(sigaction)); + memset(&act, 0, sizeof(act)); act.sa_sigaction = fault_handler; sigemptyset(&act.sa_mask); /* In Racket, SIGCHLD or SIGINT handling may trigger a write barrier: */ @@ -269,7 +269,7 @@ static void remove_signal_handler(GCTYPE *gc) # ifdef NEED_SIGACTION { struct sigaction act, oact; - memset(&act, 0, sizeof(sigaction)); + memset(&act, 0, sizeof(act)); act.sa_handler = SIG_DFL; sigemptyset(&act.sa_mask); act.sa_flags = SA_SIGINFO;