aboutsummaryrefslogtreecommitdiff
path: root/nxcomp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-09 14:20:22 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-09 14:20:22 +0100
commita0b2fd836883e8ec429d5f31779c61f31b1a204d (patch)
tree2fb7a5c972fbd4fb6c0f64816d8f4de65d0b1d52 /nxcomp
parenta720908a60a2bc8da177582f80537ecf3eee45d8 (diff)
downloadnx-libs-a0b2fd836883e8ec429d5f31779c61f31b1a204d.tar.gz
nx-libs-a0b2fd836883e8ec429d5f31779c61f31b1a204d.tar.bz2
nx-libs-a0b2fd836883e8ec429d5f31779c61f31b1a204d.zip
sa_restorer vs. memset (008_nxcomp_sa-restorer.full+lite.patch).
Use memset instead of setting sa_restorer to NULL. Original-Author: Alexander Morozov
Diffstat (limited to 'nxcomp')
-rw-r--r--nxcomp/Loop.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index 92b6fc28f..14e5ee795 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -5884,20 +5884,9 @@ void InstallSignal(int signal, int action)
struct sigaction newAction;
- newAction.sa_handler = HandleSignal;
-
- //
- // This field doesn't exist on most OSes except
- // Linux. We keep setting the field to NULL to
- // avoid side-effects in the case the field is
- // a value return.
- //
+ memset(&newAction, 0, sizeof(newAction));
- #if defined(__linux__)
-
- newAction.sa_restorer = NULL;
-
- #endif
+ newAction.sa_handler = HandleSignal;
sigemptyset(&(newAction.sa_mask));
@@ -6509,13 +6498,9 @@ void SetTimer(int value)
struct sigaction action;
- action.sa_handler = HandleTimer;
-
- #if defined(__linux__)
+ memset(&action, 0, sizeof(action));
- action.sa_restorer = NULL;
-
- #endif
+ action.sa_handler = HandleTimer;
sigemptyset(&action.sa_mask);