aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-07 08:33:15 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-07 08:33:15 +0200
commit70f12a8a7dc23b7fe64aae9ef6cc4283b10192df (patch)
tree734865584b917e0523d69e5452de664dff048b15
parent37005cc443d8725a0103fdd4ded0b1d38853ef42 (diff)
downloadliberty-70f12a8a7dc23b7fe64aae9ef6cc4283b10192df.tar.gz
liberty-70f12a8a7dc23b7fe64aae9ef6cc4283b10192df.tar.xz
liberty-70f12a8a7dc23b7fe64aae9ef6cc4283b10192df.zip
Don't print out full path in assertions
-rw-r--r--liberty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/liberty.c b/liberty.c
index b3ea3e3..0f37a93 100644
--- a/liberty.c
+++ b/liberty.c
@@ -187,6 +187,9 @@ static void
assertion_failure_handler (bool is_fatal, const char *file, int line,
const char *function, const char *condition)
{
+ const char *slash = strrchr (file, '/');
+ if (slash)
+ file = slash + 1;
if (is_fatal)
{
print_fatal ("assertion failed [%s:%d in function %s]: %s",