Changeset 45671f48 in mainline
- Timestamp:
- 2005-05-11T19:14:15Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 02a99d2
- Parents:
- d7568a9f
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
include/list.h
rd7568a9f r45671f48 73 73 #define list_get_instance(link,type,member) (type *)(((__u8*)(link))-((__u8*)&(((type *)NULL)->member))) 74 74 75 extern int list_member(link_t *link,link_t *head);75 extern bool list_member(const link_t *link, const link_t *head); 76 76 extern void list_concat(link_t *head1, link_t *head2); 77 77 -
include/typedefs.h
rd7568a9f r45671f48 29 29 #ifndef __TYPEDEFS_H__ 30 30 #define __TYPEDEFS_H__ 31 32 #define false 0 33 #define true 1 34 35 typedef short bool; 31 36 32 37 typedef struct config config_t; -
src/lib/list.c
rd7568a9f r45671f48 38 38 * @param head List to look in. 39 39 * 40 * @return 1 if link is contained in head, 0otherwise.40 * @return true if link is contained in head, false otherwise. 41 41 * 42 42 */ 43 int list_member(link_t *link,link_t *head)43 bool list_member(const link_t *link, const link_t *head) 44 44 { 45 int found = 0;45 bool found = false; 46 46 link_t *hlp = head->next; 47 47 48 48 while (hlp != head) { 49 49 if (hlp == link) { 50 found = 1;50 found = true; 51 51 break; 52 52 }
Note:
See TracChangeset
for help on using the changeset viewer.