diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-01-15 14:08:22 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-01-16 14:23:56 -0500 |
commit | b31fedc279c8eb4f447212afc3dc6c9f62b9ee6e (patch) | |
tree | f4e56a186f7dd7362b47f33a345d1dcdb6e34420 | |
parent | 95bc3ed03bf192e3e62278850101fb94d46ab660 (diff) | |
download | bfs-b31fedc279c8eb4f447212afc3dc6c9f62b9ee6e.tar.xz |
list: Don't use leading underscores for globals
-rw-r--r-- | src/list.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -377,21 +377,21 @@ // Scratch variables for the type-safe SLIST_REMOVE() implementation. // Not a pointer type due to https://github.com/llvm/llvm-project/issues/109718. _maybe_unused -static thread_local uintptr_t _slist_prev, _slist_next; +static thread_local uintptr_t slist_prev_, slist_next_; /** Suppress -Wunused-value. */ _maybe_unused -static inline void *_slist_cast(uintptr_t ptr) { +static inline void *slist_cast_(uintptr_t ptr) { return (void *)ptr; } #define SLIST_REMOVE__(list, cursor, next) \ - (_slist_prev = (uintptr_t)(void *)*cursor, \ - _slist_next = (uintptr_t)(void *)(*cursor)->next, \ + (slist_prev_ = (uintptr_t)(void *)*cursor, \ + slist_next_ = (uintptr_t)(void *)(*cursor)->next, \ (*cursor)->next = NULL, \ - *cursor = (void *)_slist_next, \ + *cursor = (void *)slist_next_, \ list->tail = *cursor ? list->tail : cursor, \ - _slist_cast(_slist_prev)) + slist_cast_(slist_prev_)) /** * Pop the head off a singly-linked list. |