X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Flist.h;h=186e0ad616c26b21184a2ebe2a64b165d92a6b1f;hb=f79cc0e0bba16a3aa42a5fa13098cda714623205;hp=3cda17a6a3269963a0ab71c9ab7f182c5636e4fd;hpb=196806f90f40fcc0cf727abd4bed6bc5aefff5ff;p=meshlink diff --git a/src/list.h b/src/list.h index 3cda17a6..186e0ad6 100644 --- a/src/list.h +++ b/src/list.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_LIST_H +#define MESHLINK_LIST_H + /* list.h -- header file for list.c - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +20,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __MESHLINK_LIST_H__ -#define __MESHLINK_LIST_H__ - typedef struct list_node_t { struct list_node_t *prev; struct list_node_t *next; @@ -35,7 +35,7 @@ typedef void (*list_action_node_t)(const list_node_t *); typedef struct list_t { list_node_t *head; list_node_t *tail; - int count; + unsigned int count; /* Callbacks */ @@ -80,4 +80,4 @@ extern void list_foreach_node(list_t *, list_action_node_t); #define list_each(type, item, list) (type *item = (type *)1; item; item = NULL) for(list_node_t *node = (list)->head, *next; item = node ? node->data : NULL, next = node ? node->next : NULL, node; node = next) -#endif /* __MESHLINK_LIST_H__ */ +#endif