Skip to content

Commit

Permalink
lib: fix misplaced brace in typesafe lists
Browse files Browse the repository at this point in the history
OMGWTFBBQ no. 2...

Signed-off-by: David Lamparter <equinox@diac24.net>
  • Loading branch information
eqvinox committed Jul 28, 2019
1 parent 9c3a217 commit 4d5cf6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/typesafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ macro_inline type *prefix ## _find_gteq(struct prefix##_head *h, \
struct ssort_item *sitem = h->sh.first; \
int cmpval = 0; \
while (sitem && (cmpval = cmpfn_nuq( \
container_of(sitem, type, field.si), item) < 0)) \
container_of(sitem, type, field.si), item)) < 0) \
sitem = sitem->next; \
return container_of_null(sitem, type, field.si); \
} \
Expand All @@ -444,7 +444,7 @@ macro_inline type *prefix ## _find_lt(struct prefix##_head *h, \
struct ssort_item *prev = NULL, *sitem = h->sh.first; \
int cmpval = 0; \
while (sitem && (cmpval = cmpfn_nuq( \
container_of(sitem, type, field.si), item) < 0)) \
container_of(sitem, type, field.si), item)) < 0) \
sitem = (prev = sitem)->next; \
return container_of_null(prev, type, field.si); \
} \
Expand Down Expand Up @@ -499,7 +499,7 @@ macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \
struct ssort_item *sitem = h->sh.first; \
int cmpval = 0; \
while (sitem && (cmpval = cmpfn( \
container_of(sitem, type, field.si), item) < 0)) \
container_of(sitem, type, field.si), item)) < 0) \
sitem = sitem->next; \
if (!sitem || cmpval > 0) \
return NULL; \
Expand Down

0 comments on commit 4d5cf6b

Please sign in to comment.