On Mon, Apr 10, 2017 at 04:42:09PM +0200, Sterling Hughes wrote:
> I don’t think we ever came to agreement, and things are a bit of a 
> mishmash.  Ben brings up a good point.
> 
> Mynewt wide, in my view:
> 
> * os_error is a relic, and sys/defs codes should be used.
> 
> * All functions should return “int” and not “os_error_t” or a 
> specific error type.
> 
> * 0 and -1 are SYS_EOK and SYS_EUNKNOWN (new value) respectively, and 
> can be safely returned as numbers not defines.
> 
> * For other errors, the SYS_* equivalents should be returned.
> 
> Thoughts?

Sounds good to me.  I particularly like using 0 rather than SYS_EOK.
It's completely subjective, but I think it makes the code easier to
read.

Chris

Reply via email to