about summary refs log tree commit diff
path: root/signal/sigempty.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-05-08 17:29:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-05-08 17:29:10 +0200
commit9f6bd1f6057e57cce9b07844c28f15859ab15d49 (patch)
tree639c756bde985f44ab57c6d03e93b0d06b300eee /signal/sigempty.c
parent3404def00a1b332080fa51044733f6ead0eae5f3 (diff)
downloadglibc-9f6bd1f6057e57cce9b07844c28f15859ab15d49.tar.gz
glibc-9f6bd1f6057e57cce9b07844c28f15859ab15d49.tar.xz
glibc-9f6bd1f6057e57cce9b07844c28f15859ab15d49.zip
signal: Use <sigsetops.h> for sigemptyset, sigfillset
This avoids changing the entire sigset_t structure.  Updating the
actually used part is sufficient.
Diffstat (limited to 'signal/sigempty.c')
-rw-r--r--signal/sigempty.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/signal/sigempty.c b/signal/sigempty.c
index 794e449997..31b1145027 100644
--- a/signal/sigempty.c
+++ b/signal/sigempty.c
@@ -17,7 +17,7 @@
 
 #include <errno.h>
 #include <signal.h>
-#include <string.h>
+#include <sigsetops.h>
 
 /* 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)