Replaced log_assert() do { ... } while (0) hack with a static inline function