Replace when/not with unless.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>