From a62186e44c606a8d4cb45b3d8c3cc9fa6a5038ea Mon Sep 17 00:00:00 2001
From: Uwe Hermann <uwe@hermann-uwe.de>
Date: Wed, 21 Dec 2011 19:09:46 +0100
Subject: srd: SRD_ERR_ARGS -> SRD_ERR_ARG.

This is done to be consistent with libsigrok's SR_ERR_ARG (nicer that way).
---
 controller.c   | 6 +++---
 log.c          | 4 ++--
 sigrokdecode.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/controller.c b/controller.c
index 31aad0e..882cafb 100644
--- a/controller.c
+++ b/controller.c
@@ -311,11 +311,11 @@ int srd_run_decoder(struct srd_decoder_instance *dec,
 
 	/* 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;
diff --git a/log.c b/log.c
index a051a15..6add447 100644
--- a/log.c
+++ b/log.c
@@ -34,13 +34,13 @@ static int srd_loglevel = SRD_LOG_WARN; /* Show errors+warnings per default. */
  *
  * @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;
diff --git a/sigrokdecode.h b/sigrokdecode.h
index f7d93ac..4d7567f 100644
--- a/sigrokdecode.h
+++ b/sigrokdecode.h
@@ -49,7 +49,7 @@ extern "C" {
 #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 */
 
-- 
cgit v1.2.3-70-g09d2