1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Fix SET_FAIL macro.

This commit is contained in:
Martin Ling 2013-11-25 11:34:42 +00:00
parent 33d5ff47b5
commit aac4d7f292

View File

@ -154,7 +154,7 @@ void (*sp_debug_handler)(const char *format, ...) = sp_default_debug_handler;
#define RETURN_FAIL(msg) do { DEBUG_FAIL(msg); return SP_ERR_FAIL; } while (0)
#define RETURN_VALUE(fmt, x) do { DEBUG("%s returning " fmt, __func__, x); return x; } while (0)
#define SET_ERROR(val, err, msg) do { DEBUG_ERROR(err, msg); val = err; } while (0)
#define SET_FAIL(val, msg) do { DEBUG_FAIL(msg); val = err; } while (0)
#define SET_FAIL(val, msg) do { DEBUG_FAIL(msg); val = SP_ERR_FAIL; } while (0)
#define TRACE(fmt, ...) DEBUG("%s(" fmt ") called", __func__, ##__VA_ARGS__)
#define TRY(x) do { int ret = x; if (ret != SP_OK) RETURN_CODEVAL(ret); } while (0)