sys/queue.h: add LIST_FOREACH_SAFE
This commit is contained in:
		
							parent
							
								
									361f377493
								
							
						
					
					
						commit
						d23c3d110e
					
				@ -166,6 +166,11 @@ struct {								\
 | 
			
		||||
		(var);							\
 | 
			
		||||
		(var) = ((var)->field.le_next))
 | 
			
		||||
 | 
			
		||||
#define	LIST_FOREACH_SAFE(var, head, field, tvar)			\
 | 
			
		||||
	for ((var) = LIST_FIRST((head));				\
 | 
			
		||||
		(var) && ((tvar) = LIST_NEXT((var), field), 1);		\
 | 
			
		||||
		(var) = (tvar))
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * List access methods.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user