Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Do 1UL << ... instead of 1 << ...
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Oct 24, 2012
1 parent 09e149a commit 5323ea3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/sys/posix/sys/select.d
Expand Up @@ -240,17 +240,17 @@ else version (Solaris)

extern (D) void FD_SET(int __n, fd_set* __p)
{
__p.fds_bits[__n / FD_NFDBITS] |= 1 << (__n % FD_NFDBITS);
__p.fds_bits[__n / FD_NFDBITS] |= 1UL << (__n % FD_NFDBITS);
}

extern (D) void FD_CLR(int __n, fd_set* __p)
{
__p.fds_bits[__n / FD_NFDBITS] &= ~(1 << (__n % FD_NFDBITS));
__p.fds_bits[__n / FD_NFDBITS] &= ~(1UL << (__n % FD_NFDBITS));
}

extern (D) bool FD_ISSET(int __n, const(fd_set)* __p)
{
return (__p.fds_bits[__n / FD_NFDBITS] & (1 << (__n % FD_NFDBITS))) != 0;
return (__p.fds_bits[__n / FD_NFDBITS] & (1UL << (__n % FD_NFDBITS))) != 0;
}

extern (D) void FD_ZERO(fd_set* __p)
Expand Down

0 comments on commit 5323ea3

Please sign in to comment.