From 2154d1a23157cc2b0ff72f1ed51e5c8a26b452cb Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 6 Mar 2011 15:10:07 -0600 Subject: [PATCH] use memset to initialize sigaction structure --- signal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/signal.c b/signal.c index c87c508..102c3cf 100644 --- a/signal.c +++ b/signal.c @@ -25,9 +25,6 @@ #include "espeakup.h" -/* A struct sigaction with all values set to zero. */ -static struct sigaction OUR_SIGACTION_INITIALIZER; - /* * We install a dummy signal handler to let the o/s know that we * do not want the default action to be performed since we are @@ -39,10 +36,11 @@ static void dummy_handler(int sig) void *signal_thread(void *arg) { - struct sigaction temp = OUR_SIGACTION_INITIALIZER; + struct sigaction temp; sigset_t sigset; int sig; + memset(&temp, 0, sizeof (struct sigaction)); /* install dummy handlers for the signals we want to process */ temp.sa_handler = dummy_handler; sigemptyset(&temp.sa_mask);