[X2Go-Commits] [nx-libs] 11/29: sa_restorer vs. memset (008_nxcomp_sa-restorer.full+lite.patch). Use memset instead of setting sa_restorer to NULL.
git-admin at x2go.org
git-admin at x2go.org
Tue Feb 10 05:21:42 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit a0b2fd836883e8ec429d5f31779c61f31b1a204d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Feb 9 14:20:22 2015 +0100
sa_restorer vs. memset (008_nxcomp_sa-restorer.full+lite.patch).
Use memset instead of setting sa_restorer to NULL.
Original-Author: Alexander Morozov
---
.../patches/008_nxcomp_sa-restorer.full+lite.patch | 46 --------------------
debian/patches/series | 1 -
nxcomp/Loop.cpp | 23 ++--------
3 files changed, 4 insertions(+), 66 deletions(-)
diff --git a/debian/patches/008_nxcomp_sa-restorer.full+lite.patch b/debian/patches/008_nxcomp_sa-restorer.full+lite.patch
deleted file mode 100644
index f1447cc..0000000
--- a/debian/patches/008_nxcomp_sa-restorer.full+lite.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Description: sa_restorer vs. memset
- Use memset instead of setting sa_restorer to NULL.
-Forwarded: pending
-Author: Alexander Morozov
-Last-Update: 2012-02-07
---- a/nxcomp/Loop.cpp
-+++ b/nxcomp/Loop.cpp
-@@ -5884,20 +5884,9 @@
-
- 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 @@
-
- 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);
-
diff --git a/debian/patches/series b/debian/patches/series
index 81a71d3..9f56169 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-008_nxcomp_sa-restorer.full+lite.patch
009_nxproxy_add-man-page.full+lite.patch
009_nxagent_add-man-page.full.patch
010_nxauth_fix-binary-name-in-man-page.full.patch
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index 92b6fc2..14e5ee7 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);
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list