signal: Use <sigsetops.h> for sigemptyset, sigfillset

This avoids changing the entire sigset_t structure.  Updating the
actually used part is sufficient.
This commit is contained in:
Florian Weimer 2020-05-08 17:29:10 +02:00
parent 3404def00a
commit 9f6bd1f605
2 changed files with 4 additions and 7 deletions

View File

@ -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)

View File

@ -17,8 +17,8 @@
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <internal-signals.h>
#include <sigsetops.h>
/* 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)