Fix compile error.

I'm not at all sure this is the right fix; I'm not that familiar with the atomic
functions so don't really understand the return conventions.