This is done to be consistent with libsigrok's SR_ERR_ARG (nicer that way).
/* Return an error upon unusable input. */
if (dec == NULL)
- return SRD_ERR_ARGS; /* TODO: More specific error? */
+ return SRD_ERR_ARG; /* TODO: More specific error? */
if (inbuf == NULL)
- return SRD_ERR_ARGS; /* TODO: More specific error? */
+ return SRD_ERR_ARG; /* TODO: More specific error? */
if (inbuflen == 0) /* No point in working on empty buffers. */
- return SRD_ERR_ARGS; /* TODO: More specific error? */
+ return SRD_ERR_ARG; /* TODO: More specific error? */
/* TODO: Error handling. */
py_instance = dec->py_instance;
*
* @param loglevel The loglevel to set (SRD_LOG_NONE, SRD_LOG_ERR,
* SRD_LOG_WARN, SRD_LOG_INFO, SRD_LOG_DBG, or SRD_LOG_SPEW).
- * @return SRD_OK upon success, SRD_ERR_ARGS upon invalid loglevel.
+ * @return SRD_OK upon success, SRD_ERR_ARG upon invalid loglevel.
*/
int srd_set_loglevel(int loglevel)
{
if (loglevel < SRD_LOG_NONE || loglevel > SRD_LOG_SPEW) {
srd_err("log: %s: invalid loglevel %d", __func__, loglevel);
- return SRD_ERR_ARGS;
+ return SRD_ERR_ARG;
}
srd_loglevel = loglevel;
#define SRD_OK 0 /**< No error */
#define SRD_ERR -1 /**< Generic/unspecified error */
#define SRD_ERR_MALLOC -2 /**< Malloc/calloc/realloc error */
-#define SRD_ERR_ARGS -3 /**< Function argument error */
+#define SRD_ERR_ARG -3 /**< Function argument error */
#define SRD_ERR_PYTHON -4 /**< Python C API error */
#define SRD_ERR_DECODERS_DIR -5 /**< Protocol decoder path invalid */