Fix some badly-behaved macros

Some macros evaluated their arguments more than once when it was not
needed, or were missing parentheses.
This commit is contained in:
Demi Marie Obenour 2022-09-01 17:02:44 -04:00
parent bb4f274ae0
commit 671a7102ff
46 changed files with 162 additions and 156 deletions

View file

@ -415,7 +415,7 @@ struct spa_pod_prop_body0 {
(iter) <= SPA_PTROFF((body), (_size)-(body)->value.size, __typeof__(*iter)); \
(iter) = SPA_PTROFF((iter), (body)->value.size, __typeof__(*iter)))
#define SPA0_POD_PROP_N_VALUES(b,size) ((size - sizeof(struct spa_pod_prop_body0)) / (b)->value.size)
#define SPA0_POD_PROP_N_VALUES(b,size) (((size) - sizeof(struct spa_pod_prop_body0)) / (b)->value.size)
static int remap_from_v2(uint32_t type, void *body, uint32_t size, struct pw_impl_client *client,
struct spa_pod_builder *builder)