pod: handle NULL

This commit is contained in:
Wim Taymans 2017-03-23 16:08:50 +01:00
parent e28b5f91b8
commit 3dba9f0fd4
10 changed files with 121 additions and 111 deletions

View file

@ -104,6 +104,7 @@ typedef void (*SpaNotify) (void *data);
#define SPA_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
#define SPA_MIN(a,b) ((a)<(b) ? (a) : (b))
#define SPA_MAX(a,b) ((a)>(b) ? (a) : (b))
#define SPA_ABS(a) ((a)>0 ? (a) : -(a))
#define SPA_CLAMP(v,a,b) ((v)>(b) ? (b) : ((v) < (a) ? (a) : (v)))
#define SPA_MEMBER(b,o,t) ((t*)((uint8_t*)(b) + (o)))