mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	scanner: remove list_length in favor of wl_list_length
This commit is contained in:
		
							parent
							
								
									df1a934b8b
								
							
						
					
					
						commit
						f53f42a1e7
					
				
					 1 changed files with 2 additions and 14 deletions
				
			
		| 
						 | 
					@ -127,18 +127,6 @@ struct parse_context {
 | 
				
			||||||
	unsigned int character_data_length;
 | 
						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 *
 | 
					static char *
 | 
				
			||||||
uppercase_dup(const char *src)
 | 
					uppercase_dup(const char *src)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -1123,13 +1111,13 @@ emit_code(struct protocol *protocol)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!wl_list_empty(&i->request_list))
 | 
							if (!wl_list_empty(&i->request_list))
 | 
				
			||||||
			printf("\t%d, %s_requests,\n",
 | 
								printf("\t%d, %s_requests,\n",
 | 
				
			||||||
			       list_length(&i->request_list), i->name);
 | 
								       wl_list_length(&i->request_list), i->name);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			printf("\t0, NULL,\n");
 | 
								printf("\t0, NULL,\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!wl_list_empty(&i->event_list))
 | 
							if (!wl_list_empty(&i->event_list))
 | 
				
			||||||
			printf("\t%d, %s_events,\n",
 | 
								printf("\t%d, %s_events,\n",
 | 
				
			||||||
			       list_length(&i->event_list), i->name);
 | 
								       wl_list_length(&i->event_list), i->name);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			printf("\t0, NULL,\n");
 | 
								printf("\t0, NULL,\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue