mbed library sources
Fork of mbed-src by
Diff: common/us_ticker_api.c
- Revision:
- 496:01cb89f68337
- Parent:
- 485:b5ae48b573d3
- Child:
- 526:c320967f86b9
--- a/common/us_ticker_api.c Fri Mar 20 09:15:08 2015 +0000 +++ b/common/us_ticker_api.c Fri Mar 20 09:30:08 2015 +0000 @@ -77,6 +77,10 @@ prev = p; p = p->next; } + + /* if we're at the end p will be NULL, which is correct */ + obj->next = p; + /* if prev is NULL we're at the head */ if (prev == NULL) { head = obj; @@ -84,8 +88,6 @@ } else { prev->next = obj; } - /* if we're at the end p will be NULL, which is correct */ - obj->next = p; __enable_irq(); }