From cdf430be43c5dabda35279c0fa3eed19c8c5d011 Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Fri, 27 Oct 2023 08:20:18 -0500 Subject: aboutta have dead battery --- software_pwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software_pwm.c b/software_pwm.c index 2334976..ca120d9 100644 --- a/software_pwm.c +++ b/software_pwm.c @@ -31,12 +31,12 @@ static struct pwm_event { ((struct pwm_event *)(char *)member_ptr - member_offset) #define MEMBER_FROM_EVENT(event_ptr, member_offset) \ - ((struct link_pair *)(char *)event_ + ((struct link_pair *)(char *)event_ptr + member_offset) static void list_insert(struct link_pair *new_links, struct link_pair *prev_links, size_t parent_offset) { new_links->next = prev_links->next; new_links->prev = EVENT_FROM_MEMBER(prev_links, parent_offset); - ((struct link_pair *)(char *)prev_links->next + parent_offset)->prev = + MEMBER_FROM_EVENT()->prev = EVENT_FROM_MEMBER(new_links, parent_offset); //GYAAAAGH prev_links->next = EVENT_FROM_MEMBER(prev_links, parent_offset); } -- cgit v1.2.3