The `s->allocated == 0` needs parenthesis as ?: evaluates right to left. The `?` and `:` also needs spaces on both sides..