Skip to content

Commit 4b322d6

Browse files
authored
Merge pull request #6263 from pauluap/equeue_gcc7_c++x11_warning
Clarify intention between comparison to zero and the shift operation
2 parents fb0eba4 + 210f50d commit 4b322d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

events/equeue/equeue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static inline int equeue_clampdiff(unsigned a, unsigned b) {
3737
// Increment the unique id in an event, hiding the event from cancel
3838
static inline void equeue_incid(equeue_t *q, struct equeue_event *e) {
3939
e->id += 1;
40-
if (!(e->id << q->npw2)) {
40+
if ((e->id << q->npw2) == 0) {
4141
e->id = 1;
4242
}
4343
}
@@ -469,7 +469,7 @@ void equeue_event_dtor(void *p, void (*dtor)(void *)) {
469469
}
470470

471471

472-
// simple callbacks
472+
// simple callbacks
473473
struct ecallback {
474474
void (*cb)(void*);
475475
void *data;

0 commit comments

Comments
 (0)