Any negative return value should be an error, from what I understand, but checking for equal -1 is more explicit.