函数返回值的一些规则

有一些简单的规则,从POSIX约定开始:

Methods that create objects return NULL if they fail.

Methods that process data may return the number of bytes processed, or -1 on an error or failure.

Other methods return 0 on success and -1 on an error or failure.

The error code is provided in errno or zmq_errno().

posted @ 2021-09-20 12:05  水色天空  阅读(34)  评论(0编辑  收藏  举报