Changeset 639db552 in mainline


Ignore:
Timestamp:
2013-12-31T01:13:19Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad5f149
Parents:
952bc66
Message:

list: Add more constness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/adt/list.h

    r952bc66 r639db552  
    108108
    109109/** Returns true if the link is definitely part of a list. False if not sure. */
    110 static inline int link_in_use(link_t *link)
     110static inline int link_in_use(const link_t *link)
    111111{
    112112        return link->prev != NULL && link->next != NULL;
     
    238238 *
    239239 */
    240 static inline link_t *list_last(list_t *list)
     240static inline link_t *list_last(const list_t *list)
    241241{
    242242        return (list->head.prev == &list->head) ? NULL : list->head.prev;
     
    251251 *
    252252 */
    253 static inline link_t *list_next(link_t *link, const list_t *list)
     253static inline link_t *list_next(const link_t *link, const list_t *list)
    254254{
    255255        return (link->next == &list->head) ? NULL : link->next;
     
    264264 *
    265265 */
    266 static inline link_t *list_prev(link_t *link, const list_t *list)
     266static inline link_t *list_prev(const link_t *link, const list_t *list)
    267267{
    268268        return (link->prev == &list->head) ? NULL : link->prev;
     
    332332 *
    333333 */
    334 static inline link_t *list_nth(list_t *list, unsigned int n)
     334static inline link_t *list_nth(const list_t *list, unsigned int n)
    335335{
    336336        unsigned int cnt = 0;
Note: See TracChangeset for help on using the changeset viewer.