Changeset 45671f48 in mainline for src/lib/list.c


Ignore:
Timestamp:
2005-05-11T19:14:15Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
02a99d2
Parents:
d7568a9f
Message:

typedef short bool (as logical type), defines of false and true
const qualifier for list_member()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lib/list.c

    rd7568a9f r45671f48  
    3838 * @param head List to look in.
    3939 *
    40  * @return 1 if link is contained in head, 0 otherwise.
     40 * @return true if link is contained in head, false otherwise.
    4141 *
    4242 */
    43 int list_member(link_t *link, link_t *head)
     43bool list_member(const link_t *link, const link_t *head)
    4444{
    45         int found = 0;
     45        bool found = false;
    4646        link_t *hlp = head->next;
    4747       
    4848        while (hlp != head) {
    4949                if (hlp == link) {
    50                         found = 1;
     50                        found = true;
    5151                        break;
    5252                }
Note: See TracChangeset for help on using the changeset viewer.