summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut2010-07-25 18:09:28 +0200
committerSylvain Munaut2010-07-25 18:09:28 +0200
commit7459d6cfd1765f8431b3d9a262eff332f9af807c (patch)
tree21325d252d41583e8e5076cc1a5c3acc3ed580d8
parentcore: Add some generic panic handling (diff)
downloadosmocom-7459d6cfd1765f8431b3d9a262eff332f9af807c.tar.gz
osmocom-7459d6cfd1765f8431b3d9a262eff332f9af807c.tar.xz
osmocom-7459d6cfd1765f8431b3d9a262eff332f9af807c.zip
core/msgb: Use the new osmo_panic call to handle errors
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--include/osmocore/msgb.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/osmocore/msgb.h b/include/osmocore/msgb.h
index 962ba4e..354c5d8 100644
--- a/include/osmocore/msgb.h
+++ b/include/osmocore/msgb.h
@@ -61,12 +61,10 @@ extern struct msgb *msgb_dequeue(struct llist_head *queue);
extern void msgb_reset(struct msgb *m);
#ifdef MSGB_DEBUG
-#include <stdio.h>
-#include <stdlib.h>
+#include <osmocore/panic.h>
static inline void msgb_abort(struct msgb *msg, const char *text)
{
- fprintf(stderr, "%s", text);
- abort();
+ osmo_panic("%s", text);
}
#endif