aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/utils.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-05-10 15:23:06 +0200
committerHolger Freyther <holger@freyther.de>2016-05-12 11:15:22 +0000
commit3d79240fb41270d58f9c33508e11f0c215951cc9 (patch)
treeb8eaf3cbe17f99c83cfcc2684667827fbf4cc03a /include/osmocom/core/utils.h
parentd71257fdb6d3ba3cfb60a87f4e29226cce6976f5 (diff)
logging: Use __BASE_FILE__ instead of __FILE__
Apparently __FILE__ expands to nasty '../../..' paths when BUILDDIR != SRCDIR. This in turn leads to ugly log lines like: <0000> ../../../../osmo-bts/src/common/rsl.c:1642 (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP Where we certainly wouldn't want the "../../../../osmo-bts" part. Change-Id: If6d2de33c3b6bb2943954bbd81eff261dc279d58 Reviewed-on: https://gerrit.osmocom.org/38 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
Diffstat (limited to 'include/osmocom/core/utils.h')
-rw-r--r--include/osmocom/core/utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index dbc454f6..bc395193 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -60,7 +60,7 @@ do { \
*/
#define OSMO_ASSERT(exp) \
if (!(exp)) { \
- fprintf(stderr, "Assert failed %s %s:%d\n", #exp, __FILE__, __LINE__); \
+ fprintf(stderr, "Assert failed %s %s:%d\n", #exp, __BASE_FILE__, __LINE__); \
osmo_generate_backtrace(); \
abort(); \
}