Skip to content

Commit

Permalink
Flip order of comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Thompson authored and geky committed Aug 4, 2019
1 parent 95f10d9 commit c4e8a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions equeue.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static inline int equeue_clampdiff(unsigned a, unsigned b) {
// Increment the unique id in an event, hiding the event from cancel
static inline void equeue_incid(equeue_t *q, struct equeue_event *e) {
e->id += 1;
if (0 == (e->id << q->npw2)) {
if ((e->id << q->npw2) == 0) {
e->id = 1;
}
}
Expand Down Expand Up @@ -458,7 +458,7 @@ void equeue_event_dtor(void *p, void (*dtor)(void *)) {
}


// simple callbacks
// simple callbacks
struct ecallback {
void (*cb)(void*);
void *data;
Expand Down

0 comments on commit c4e8a61

Please sign in to comment.