avoid LLVM warning: skip ternary operator when value is unsigned

I'm sure the C compiler does the right thing, but the warning is annoying.