X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilclog.h;h=80db7783cc046fc26fc4cb50ecc146d91958b605;hp=4ae8ca9ccf08ad1034e9391e07a808833aa7fed7;hb=51558729d89b9f3492b2ca754242ed548a579ca4;hpb=1c3ae0efc13419718213114e140c3d83b4608c1e diff --git a/lib/silcutil/silclog.h b/lib/silcutil/silclog.h index 4ae8ca9c..80db7783 100644 --- a/lib/silcutil/silclog.h +++ b/lib/silcutil/silclog.h @@ -317,7 +317,7 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line, * * DESCRIPTION * - * Verification macro that prints error message to stderr and calls + * Verification macro that prints error message to stderr and calls * abort() if the `expression' is false (ie. compares equal to zero) * on debug builds (SILC_DEBUG defined), and prints error message to * stderr on release builds (SILC_DEBUG undefined) but does not abort(). @@ -330,8 +330,12 @@ typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line, #define SILC_VERIFY(expr) assert((expr)); #else #define SILC_VERIFY(expr) \ - if (!(expr)) \ - SILC_LOG_ERROR(("SILC_VERIFY %s:%d", __FUNCTION__, __LINE__)); + if (silc_unlikely(!(expr))) { \ + SILC_LOG_ERROR(("SILC_VERIFY %s:%s:%d", \ + __FILE__, __FUNCTION__, __LINE__)); \ + silc_set_errno_reason_nofail(SILC_ERR_ASSERT, "SILC_VERIFY %s:%s:%d", \ + __FILE__, __FUNCTION__, __LINE__); \ + } #endif /* SILC_DEBUG */ /***/