From 76c24a0ba9bef65a2d0945f61587160cab6f4a7e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 23 May 2025 13:13:08 +0200 Subject: [PATCH] sdk: add generic X return code This type is should be used instead of plain int for all functions returning and X error code (that's possibly sent to the client), in order to make return value semantics clear to the humen reader. (for the compiler, it still will be just an int) Signed-off-by: Enrico Weigelt, metux IT consult --- include/misc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/misc.h b/include/misc.h index 90d7046d3..6ce214e61 100644 --- a/include/misc.h +++ b/include/misc.h @@ -102,6 +102,16 @@ OF THIS SOFTWARE. typedef uint32_t ATOM; +/* @brief generic X return code + * + * this type is should be used instead of plain int for all functions + * returning and X error code (that's possibly sent to the client), + * in order to make return value semantics clear to the humen reader. + * + * part of public SDK / driver API. + */ +typedef int XRetCode; + #ifndef TRUE #define TRUE 1 #define FALSE 0