modify the "result" to "errno"