fix const-correctness in sigandset/sigorset arguments
this change is consistent with the corresponding glibc functions and is semantically const-correct. the incorrect argument types without const seem to have been taken from erroneous man pages.
This commit is contained in:
parent
2c5e756025
commit
3500555db3
3 changed files with 4 additions and 4 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#define SST_SIZE (_NSIG/8/sizeof(long))
|
||||
|
||||
int sigandset(sigset_t *dest, sigset_t *left, sigset_t *right)
|
||||
int sigandset(sigset_t *dest, const sigset_t *left, const sigset_t *right)
|
||||
{
|
||||
unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
|
||||
for(; i < SST_SIZE; i++) d[i] = l[i] & r[i];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#define SST_SIZE (_NSIG/8/sizeof(long))
|
||||
|
||||
int sigorset(sigset_t *dest, sigset_t *left, sigset_t *right)
|
||||
int sigorset(sigset_t *dest, const sigset_t *left, const sigset_t *right)
|
||||
{
|
||||
unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
|
||||
for(; i < SST_SIZE; i++) d[i] = l[i] | r[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue