| 158 | #define CAPARSIZE_MAX (CAP_RIGHTS_VERSION + 2) |
| 159 | |
| 160 | static __inline int |
| 161 | right_to_index(uint64_t right) |
| 162 | { |
| 163 | static const int bit2idx[] = { |
| 164 | -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, |
| 165 | 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 |
| 166 | }; |
| 167 | int idx; |
| 168 | |
| 169 | idx = CAPIDXBIT(right); |
| 170 | assert(idx >= 0 && idx < sizeof(bit2idx) / sizeof(bit2idx[0])); |
| 171 | return (bit2idx[idx]); |
| 172 | } |
| 173 | |
| 174 | static void |
| 175 | cap_rights_vset(cap_rights_t *rights, va_list ap) |
no outgoing calls
no test coverage detected