mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: utils: defs: parenthesize macro bodies
Parenthesize the body of the `SPA_CONTAINER_OF()` and `SPA_PTR_ALIGN()` macros.
This commit is contained in:
		
							parent
							
								
									4c24a85715
								
							
						
					
					
						commit
						61594270f4
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -174,7 +174,7 @@ struct spa_fraction {
 | 
			
		|||
#define SPA_MEMBER(b,o,t) SPA_PTROFF(b,o,t)
 | 
			
		||||
#define SPA_MEMBER_ALIGN(b,o,a,t) SPA_PTROFF_ALIGN(b,o,a,t)
 | 
			
		||||
 | 
			
		||||
#define SPA_CONTAINER_OF(p,t,m) (t*)((uintptr_t)p - offsetof (t,m))
 | 
			
		||||
#define SPA_CONTAINER_OF(p,t,m) ((t*)((uintptr_t)p - offsetof(t,m)))
 | 
			
		||||
 | 
			
		||||
#define SPA_PTRDIFF(p1,p2) ((intptr_t)(p1) - (intptr_t)(p2))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -236,7 +236,7 @@ struct spa_fraction {
 | 
			
		|||
 | 
			
		||||
#define SPA_PTR_ALIGNMENT(p,align)	((intptr_t)(p) & ((align)-1))
 | 
			
		||||
#define SPA_IS_ALIGNED(p,align)		(SPA_PTR_ALIGNMENT(p,align) == 0)
 | 
			
		||||
#define SPA_PTR_ALIGN(p,align,type)	(type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align))
 | 
			
		||||
#define SPA_PTR_ALIGN(p,align,type)	((type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align)))
 | 
			
		||||
 | 
			
		||||
#ifndef SPA_LIKELY
 | 
			
		||||
#ifdef __GNUC__
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue