| 509 | locations. */ |
| 510 | |
| 511 | static inline void * |
| 512 | ptr_align (void const *ptr, size_t alignment) |
| 513 | { |
| 514 | char const *p0 = ptr; |
| 515 | char const *p1 = p0 + alignment - 1; |
| 516 | return (void *) (p1 - (size_t) p1 % alignment); |
| 517 | } |
| 518 | |
| 519 | /* Return whether the buffer consists entirely of NULs. |
| 520 | Based on memeqzero in CCAN by Rusty Russell under CC0 (Public domain). */ |
no outgoing calls
no test coverage detected