scanner: remove list_length in favor of wl_list_length
This commit is contained in:
parent
df1a934b8b
commit
f53f42a1e7
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user