MCPcopy Create free account
hub / github.com/coreutils/coreutils / ptr_align

Function ptr_align

src/system.h:511–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509 locations. */
510
511static inline void *
512ptr_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). */

Callers 2

digest_checkFunction · 0.85
cksum.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected