Clarifying write() return value