From 9f6bd1f6057e57cce9b07844c28f15859ab15d49 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 8 May 2020 17:29:10 +0200 Subject: signal: Use for sigemptyset, sigfillset This avoids changing the entire sigset_t structure. Updating the actually used part is sufficient. --- signal/sigempty.c | 5 ++--- signal/sigfillset.c | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'signal') diff --git a/signal/sigempty.c b/signal/sigempty.c index 794e449..31b1145 100644 --- a/signal/sigempty.c +++ b/signal/sigempty.c @@ -17,7 +17,7 @@ #include #include -#include +#include /* Clear all signals from SET. */ int @@ -29,8 +29,7 @@ sigemptyset (sigset_t *set) return -1; } - memset (set, 0, sizeof (sigset_t)); - + __sigemptyset (set); return 0; } libc_hidden_def (sigemptyset) diff --git a/signal/sigfillset.c b/signal/sigfillset.c index 0ca8b6b..29e98a5 100644 --- a/signal/sigfillset.c +++ b/signal/sigfillset.c @@ -17,8 +17,8 @@ #include #include -#include #include +#include /* Set all signals in SET. */ int @@ -30,10 +30,8 @@ sigfillset (sigset_t *set) return -1; } - memset (set, 0xff, sizeof (sigset_t)); - + __sigfillset (set); __clear_internal_signals (set); - return 0; } libc_hidden_def (sigfillset) -- cgit v1.1