Changeset df13836 in mainline for uspace/lib/c/include/adt/list.h


Ignore:
Timestamp:
2015-08-30T14:38:17Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be12474
Parents:
616f5dd3
Message:

Use bool for boolean values, unsigned long for counting heap objects.

File:
1 edited

Legend:

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

    r616f5dd3 rdf13836  
    133133
    134134/** Returns true if the link is definitely part of a list. False if not sure. */
    135 static inline int link_in_use(link_t *link)
     135static inline bool link_in_use(link_t *link)
    136136{
    137137        return link->prev != NULL && link->next != NULL;
     
    237237 *
    238238 */
    239 static inline int list_empty(const list_t *list)
     239static inline bool list_empty(const list_t *list)
    240240{
    241241        return (list->head.next == &list->head);
     
    357357 *
    358358 */
    359 static inline link_t *list_nth(list_t *list, unsigned int n)
    360 {
    361         unsigned int cnt = 0;
     359static inline link_t *list_nth(list_t *list, unsigned long n)
     360{
     361        unsigned long cnt = 0;
    362362       
    363363        link_t *link = list_first(list);
     
    396396}
    397397
    398 extern int list_member(const link_t *, const list_t *);
     398extern bool list_member(const link_t *, const list_t *);
    399399extern void list_concat(list_t *, list_t *);
    400 extern unsigned int list_count(const list_t *);
     400extern unsigned long list_count(const list_t *);
    401401
    402402#endif
Note: See TracChangeset for help on using the changeset viewer.