aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <jaylink-dev@marcschink.de>2016-10-28 19:49:53 +0200
committerMarc Schink <jaylink-dev@marcschink.de>2016-11-05 13:34:50 +0100
commitdfacb31462654f182b5120fd7158445cf6a165bd (patch)
tree45ec1a1a1439685d2bf6c5aac8120680fed498c6
parent8e5a880694034738ac56df54c560890393ba098c (diff)
Rearrange error codes
Signed-off-by: Marc Schink <jaylink-dev@marcschink.de>
-rw-r--r--libjaylink/error.c8
-rw-r--r--libjaylink/libjaylink.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/libjaylink/error.c b/libjaylink/error.c
index 6154070..2c696fc 100644
--- a/libjaylink/error.c
+++ b/libjaylink/error.c
@@ -44,10 +44,10 @@ JAYLINK_API const char *jaylink_strerror(int error_code)
return "no error";
case JAYLINK_ERR:
return "unspecified error";
- case JAYLINK_ERR_MALLOC:
- return "memory allocation error";
case JAYLINK_ERR_ARG:
return "invalid argument";
+ case JAYLINK_ERR_MALLOC:
+ return "memory allocation error";
case JAYLINK_ERR_TIMEOUT:
return "timeout occurred";
case JAYLINK_ERR_PROTO:
@@ -90,10 +90,10 @@ JAYLINK_API const char *jaylink_strerror_name(int error_code)
return "JAYLINK_OK";
case JAYLINK_ERR:
return "JAYLINK_ERR";
- case JAYLINK_ERR_MALLOC:
- return "JAYLINK_ERR_MALLOC";
case JAYLINK_ERR_ARG:
return "JAYLINK_ERR_ARG";
+ case JAYLINK_ERR_MALLOC:
+ return "JAYLINK_ERR_MALLOC";
case JAYLINK_ERR_TIMEOUT:
return "JAYLINK_ERR_TIMEOUT";
case JAYLINK_ERR_PROTO:
diff --git a/libjaylink/libjaylink.h b/libjaylink/libjaylink.h
index a60e70b..34d8880 100644
--- a/libjaylink/libjaylink.h
+++ b/libjaylink/libjaylink.h
@@ -43,10 +43,10 @@ enum jaylink_error {
JAYLINK_OK = 0,
/** Unspecified error. */
JAYLINK_ERR = -1,
- /** Memory allocation error. */
- JAYLINK_ERR_MALLOC = -2,
/** Invalid argument. */
- JAYLINK_ERR_ARG = -3,
+ JAYLINK_ERR_ARG = -2,
+ /** Memory allocation error. */
+ JAYLINK_ERR_MALLOC = -3,
/** Timeout occurred. */
JAYLINK_ERR_TIMEOUT = -4,
/** Protocol violation. */