<p>In lib/mdp/src/olsrd_mdp.c:</p>
<pre style='color:#555'>> @@ -85,7 +88,17 @@
>  #define OS "Undefined"
>  #endif /* OS */
>  
> +#define CLEAN_ERRNO() (errno == 0 ? "None" : strerror(errno))
> +#define ERROR(M, ...) olsr_printf(1, "(%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, CLEAN_ERRNO(), ##__VA_ARGS__)
> +#define CHECK(A, M, ...) if(!(A)) { ERROR(M, ##__VA_ARGS__); errno=0; goto error; }
> +#define CHECKF(A, M, ...) if(!(A)) { ERROR(M, ##__VA_ARGS__); exit(1); }
> +#define CHECK_MEM(A) CHECK((A), "Out of memory.")
> +#define CHECKF_MEM(A) CHECKF((A), "Out of memory.")
> +#define CO_APPEND_STR(R,S) CHECKF(co_request_append_str(co_req,S,strlen(S)+1),"Failed to append to request")
> +#define CO_APPEND_BIN(R,S,L) CHECK(co_request_append_bin(co_req,(char*)S,L),"Failed to append to request")
> +
</pre>
<p><a href="https://github.com/jheretic" class="user-mention">@jheretic</a>, any thoughts on including the commotion debug macros in commotion.h?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/opentechinstitute/olsrd/pull/15/files#r8472305'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/3074564__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwMzAwMDAzNywiZGF0YSI6eyJpZCI6MjIzMTA1MjF9fQ==--8162b09592f81e6359eb1ece00133b45c356aabe.gif' height='1' width='1'></p>