Improved debug output. (#1951)

* try to get rid of some `printf(..)`s as they do not belong to a shared library
 * replaced all `exit(..)`s with `abort()`s to indicate an abnormal process termination

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni
2023-04-21 12:40:26 +02:00
committed by GitHub
parent 85751ba9d7
commit b6629ba2be
5 changed files with 37 additions and 40 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ do {
/* malloc failures result in lost memory, hash tables are unusable */
#ifndef uthash_fatal
#define uthash_fatal(msg) exit(-1) /* fatal OOM error */
#define uthash_fatal(msg) abort() /* fatal OOM error */
#endif
#define HASH_RECORD_OOM(oomed) uthash_fatal("out of memory")
@@ -513,7 +513,7 @@ do {
*/
#ifdef HASH_DEBUG
#include <stdio.h> /* fprintf, stderr */
#define HASH_OOPS(...) do { fprintf(stderr, __VA_ARGS__); exit(-1); } while (0)
#define HASH_OOPS(...) do { fprintf(stderr, __VA_ARGS__); abort(); } while (0)
#define HASH_FSCK(hh,head,where) \
do { \
struct UT_hash_handle *_thh; \