mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	list: add spa_list_is_initialized()
This function can be used to test if a list has been initialized.
This commit is contained in:
		
							parent
							
								
									f4ad9fc90c
								
							
						
					
					
						commit
						b23b0e6125
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -51,6 +51,11 @@ static inline void spa_list_init(struct spa_list *list)
 | 
				
			||||||
	*list = SPA_LIST_INIT(list);
 | 
						*list = SPA_LIST_INIT(list);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline int spa_list_is_initialized(struct spa_list *list)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return !!list->prev;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define spa_list_is_empty(l)  ((l)->next == (l))
 | 
					#define spa_list_is_empty(l)  ((l)->next == (l))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void spa_list_insert(struct spa_list *list, struct spa_list *elem)
 | 
					static inline void spa_list_insert(struct spa_list *list, struct spa_list *elem)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue