[PATCH wayland] scanner: remove list_length in favor of wl_list_length
Ran Benita
ran234 at gmail.com
Mon Feb 25 07:12:51 PST 2013
---
src/scanner.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/scanner.c b/src/scanner.c
index 6d2eddd..fef85ab 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -127,18 +127,6 @@ struct parse_context {
unsigned int character_data_length;
};
-static int
-list_length(struct wl_list *list)
-{
- struct wl_list *l;
- int i;
-
- for (i = 0, l = list->next; l != list; i++, l = l->next)
- ;
-
- return i;
-}
-
static char *
uppercase_dup(const char *src)
{
@@ -1123,13 +1111,13 @@ emit_code(struct protocol *protocol)
if (!wl_list_empty(&i->request_list))
printf("\t%d, %s_requests,\n",
- list_length(&i->request_list), i->name);
+ wl_list_length(&i->request_list), i->name);
else
printf("\t0, NULL,\n");
if (!wl_list_empty(&i->event_list))
printf("\t%d, %s_events,\n",
- list_length(&i->event_list), i->name);
+ wl_list_length(&i->event_list), i->name);
else
printf("\t0, NULL,\n");
--
1.8.1.4
More information about the wayland-devel
mailing list