From: Bert Vermeulen Date: Sun, 30 Aug 2015 19:15:02 +0000 (+0200) Subject: Remove SR_OK_CONTINUE. X-Git-Tag: libsigrok-0.4.0~360 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=b05409d7923df5205c07e5cce2d2791eb74cf268 Remove SR_OK_CONTINUE. This brings error reporting back to the usual: either return codes are SR_OK (0) or they are < 1 indicating an error. This fixes bug #633. --- diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 63e60fba..34a8df4a 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -64,7 +64,6 @@ extern "C" { /** Status/error codes returned by libsigrok functions. */ enum sr_error_code { - SR_OK_CONTINUE = 1, /**< Keep going. */ SR_OK = 0, /**< No error. */ SR_ERR = -1, /**< Generic/unspecified error. */ SR_ERR_MALLOC = -2, /**< Malloc/calloc/realloc error. */ diff --git a/src/error.c b/src/error.c index 0280449e..cc8dbf92 100644 --- a/src/error.c +++ b/src/error.c @@ -58,8 +58,6 @@ SR_API const char *sr_strerror(int error_code) */ switch (error_code) { - case SR_OK_CONTINUE: - return "not enough data to decide error status yet"; case SR_OK: return "no error"; case SR_ERR: @@ -115,8 +113,6 @@ SR_API const char *sr_strerror_name(int error_code) */ switch (error_code) { - case SR_OK_CONTINUE: - return "SR_OK_CONTINUE"; case SR_OK: return "SR_OK"; case SR_ERR: