diff options
-rw-r--r-- | software_pwm.c | 4 |
1 files 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); } |