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

@ -50,7 +50,7 @@ struct spa_latency_info {
uint64_t max_ns;
};
#define SPA_LATENCY_INFO(dir,...) (struct spa_latency_info) { .direction = (dir), ## __VA_ARGS__ }
#define SPA_LATENCY_INFO(dir,...) ((struct spa_latency_info) { .direction = (dir), ## __VA_ARGS__ })
static inline int
spa_latency_info_compare(const struct spa_latency_info *a, struct spa_latency_info *b)
@ -146,7 +146,7 @@ struct spa_process_latency_info {
uint64_t ns;
};
#define SPA_PROCESS_LATENCY_INFO_INIT(...) (struct spa_process_latency_info) { __VA_ARGS__ }
#define SPA_PROCESS_LATENCY_INFO_INIT(...) ((struct spa_process_latency_info) { __VA_ARGS__ })
static inline int
spa_process_latency_parse(const struct spa_pod *latency, struct spa_process_latency_info *info)