diff options
| author | Trutz Behn | 2015-06-03 19:27:01 +0200 |
|---|---|---|
| committer | sin | 2015-06-03 18:55:35 +0100 |
| commit | 1cd5461a5375207602f2cbdfd9a50a9b751cb7c8 (patch) | |
| tree | f83f8a0ccb05715aadef4d2bcc770c93ea0b97ec /include/poll.h | |
| parent | a9ee1d2743acb0b2903db87c0a241c0a569cfc4e (diff) | |
Use namespace-safe macro, param and variable names
Diffstat (limited to '')
| -rw-r--r-- | include/poll.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/poll.h b/include/poll.h index 6ca08a7..d9b602c 100644 --- a/include/poll.h +++ b/include/poll.h | |||
| @@ -27,25 +27,25 @@ extern "C" { | |||
| 27 | 27 | ||
| 28 | #undef poll | 28 | #undef poll |
| 29 | 29 | ||
| 30 | fortify_fn(poll) int poll(struct pollfd *fds, nfds_t nfds, int timeout) | 30 | _FORTIFY_FN(poll) int poll(struct pollfd *__f, nfds_t __n, int __s) |
| 31 | { | 31 | { |
| 32 | __typeof__(sizeof 0) bos = __builtin_object_size(fds, 0); | 32 | __typeof__(sizeof 0) __b = __builtin_object_size(__f, 0); |
| 33 | 33 | ||
| 34 | if (nfds > bos / sizeof(struct pollfd)) | 34 | if (__n > __b / sizeof(struct pollfd)) |
| 35 | __builtin_trap(); | 35 | __builtin_trap(); |
| 36 | return __orig_poll(fds, nfds, timeout); | 36 | return __orig_poll(__f, __n, __s); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | #ifdef _GNU_SOURCE | 39 | #ifdef _GNU_SOURCE |
| 40 | #undef ppoll | 40 | #undef ppoll |
| 41 | fortify_fn(ppoll) int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, | 41 | _FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s, |
| 42 | const sigset_t *mask) | 42 | const sigset_t *__m) |
| 43 | { | 43 | { |
| 44 | __typeof__(sizeof 0) bos = __builtin_object_size(fds, 0); | 44 | __typeof__(sizeof 0) __b = __builtin_object_size(__f, 0); |
| 45 | 45 | ||
| 46 | if (nfds > bos / sizeof(struct pollfd)) | 46 | if (__n > __b / sizeof(struct pollfd)) |
| 47 | __builtin_trap(); | 47 | __builtin_trap(); |
| 48 | return __orig_ppoll(fds, nfds, timeout, mask); | 48 | return __orig_ppoll(__f, __n, __s, __m); |
| 49 | } | 49 | } |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
