On Mon, Feb 25, 2013 at 05:12:51PM +0200, Ran Benita wrote: > --- > src/scanner.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-)
Oh yeah, no reason to reinvent that. Committed. Kristian > 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 > > _______________________________________________ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel