Commit 112f9fef authored by Marek Vavruša's avatar Marek Vavruša

lib/defines: analyzable implementation for kr_error()

parent ad213c47
......@@ -47,7 +47,7 @@ typedef unsigned int uint;
#define kr_ok() 0
/* Mark as cold to mark all branches as unlikely. */
static inline int KR_COLD kr_error(int x) {
return -abs(x);
return x <= 0 ? x : -x;
}
#define kr_strerror(x) strerror(abs(x))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment