Check for errors in ctermid() (may still overflow when the argument is NULL)
Wording in a comment