[riot-notifications] [RIOT-OS/RIOT] Refactor evtimer add del (#10717)

Marian Buschsieweke notifications at github.com
Wed Jun 26 12:55:22 CEST 2019


maribu commented on this pull request.



>  {
     DEBUG("evtimer: new event offset %" PRIu32 " ms\n", event->offset);
-    /* we want list->next to point to the first list element. thus we take the
-     * *address* of evtimer->events, then cast it from (evtimer_event_t **) to
-     * (evtimer_event_t*). After that, list->next actually equals
-     * evtimer->events. */
-    evtimer_event_t *list = (evtimer_event_t *)&evtimer->events;
-
-    while (list->next) {
-        evtimer_event_t *list_entry = list->next;
+    evtimer_event_t **list = &evtimer->events;

Why not `evtimer_event_t *list = evtimer->events;` and replace `*list` by `list` in the following lines?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10717#pullrequestreview-254534195
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190626/fbede4bf/attachment.html>


More information about the notifications mailing list