Skip to content

Commit

Permalink
use memset to initialize sigaction structure
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh committed Mar 6, 2011
1 parent 1990e8e commit 2154d1a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions signal.c
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 2154d1a

Please sign in to comment.