summaryrefslogtreecommitdiffstats
path: root/libc/bionic/sigaddset.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-21 16:19:07 -0800
committerElliott Hughes <enh@google.com>2015-01-21 17:09:58 -0800
commit8b5df3920f2843c9cdf04160517c1e8b77c992f5 (patch)
treea0a678ee8f107e5c25f937f444a970a0539d2af7 /libc/bionic/sigaddset.cpp
parent2a8c929aaf8d34d2b6e89ed9c8b6da163316143e (diff)
downloadbionic-8b5df3920f2843c9cdf04160517c1e8b77c992f5.zip
bionic-8b5df3920f2843c9cdf04160517c1e8b77c992f5.tar.gz
bionic-8b5df3920f2843c9cdf04160517c1e8b77c992f5.tar.bz2
Turn on -Wold-style-cast and fix the errors.
A couple of dodgy cases where we cast away const, but otherwise pretty boring. Change-Id: Ibc39ebd525377792b5911464be842121c20f03b9
Diffstat (limited to 'libc/bionic/sigaddset.cpp')
-rw-r--r--libc/bionic/sigaddset.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/sigaddset.cpp b/libc/bionic/sigaddset.cpp
index 6ade3b1..ca6b982 100644
--- a/libc/bionic/sigaddset.cpp
+++ b/libc/bionic/sigaddset.cpp
@@ -31,8 +31,8 @@
int sigaddset(sigset_t* set, int signum) {
int bit = signum - 1; // Signal numbers start at 1, but bit positions start at 0.
- unsigned long* local_set = (unsigned long*) set;
- if (set == NULL || bit < 0 || bit >= (int) (8*sizeof(sigset_t))) {
+ unsigned long* local_set = reinterpret_cast<unsigned long*>(set);
+ if (set == NULL || bit < 0 || bit >= static_cast<int>(8*sizeof(sigset_t))) {
errno = EINVAL;
return -1;
}