diff options
Diffstat (limited to 'src/libstddjb')
-rw-r--r-- | src/libstddjb/bitarray_clearsetn.c | 2 | ||||
-rw-r--r-- | src/libstddjb/child_spawn1_internal.c | 2 | ||||
-rw-r--r-- | src/libstddjb/fd_islocked.c | 1 | ||||
-rw-r--r-- | src/libstddjb/fd_lock.c | 1 | ||||
-rw-r--r-- | src/libstddjb/fd_unlock.c | 1 |
5 files changed, 5 insertions, 2 deletions
diff --git a/src/libstddjb/bitarray_clearsetn.c b/src/libstddjb/bitarray_clearsetn.c index fe97045..613a8a8 100644 --- a/src/libstddjb/bitarray_clearsetn.c +++ b/src/libstddjb/bitarray_clearsetn.c @@ -8,7 +8,7 @@ void bitarray_clearsetn (unsigned char *s, size_t a, size_t b, int h) b += a ; if ((a >> 3) == ((b-1) >> 3)) { - unsigned char mask = (1 << (a & 7)) - 1 ^ (1 << 1 + (b-1 & 7)) - 1 ; + unsigned char mask = (1 << (a & 7)) - 1 ^ (1 << (1 + (b-1 & 7))) - 1 ; if (h) s[a>>3] |= mask ; else s[a>>3] &= ~mask ; } else diff --git a/src/libstddjb/child_spawn1_internal.c b/src/libstddjb/child_spawn1_internal.c index 460bca0..6b3dc91 100644 --- a/src/libstddjb/child_spawn1_internal.c +++ b/src/libstddjb/child_spawn1_internal.c @@ -33,7 +33,7 @@ pid_t child_spawn1_internal (char const *prog, char const *const *argv, char con } e = posix_spawn_file_actions_init(&actions) ; if (e) goto errattr ; - if (p[to & 1] != to & 1) + if (p[to & 1] != (to & 1)) { e = posix_spawn_file_actions_adddup2(&actions, p[to & 1], to & 1) ; if (e) goto erractions ; diff --git a/src/libstddjb/fd_islocked.c b/src/libstddjb/fd_islocked.c index bf9f9e8..8d5ef78 100644 --- a/src/libstddjb/fd_islocked.c +++ b/src/libstddjb/fd_islocked.c @@ -1,6 +1,7 @@ /* ISC license. */ #include <fcntl.h> +#include <unistd.h> #include <skalibs/djbunix.h> diff --git a/src/libstddjb/fd_lock.c b/src/libstddjb/fd_lock.c index 422e667..e9d1a62 100644 --- a/src/libstddjb/fd_lock.c +++ b/src/libstddjb/fd_lock.c @@ -1,6 +1,7 @@ /* ISC license. */ #include <fcntl.h> +#include <unistd.h> #include <errno.h> #include <skalibs/error.h> diff --git a/src/libstddjb/fd_unlock.c b/src/libstddjb/fd_unlock.c index 4c63fd9..0e6ac0e 100644 --- a/src/libstddjb/fd_unlock.c +++ b/src/libstddjb/fd_unlock.c @@ -1,6 +1,7 @@ /* ISC license. */ #include <fcntl.h> +#include <unistd.h> #include <errno.h> #include <skalibs/djbunix.h> |