From 835b293d35a209d38047126443d41fa7090daa4c Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 19 Jun 2017 21:20:57 +0200 Subject: Use our own variant of 'assert' and 'assert_perror'. Our variants print stack traces on failures. This will make locating errors much easier. --- libnetfs/file-set-translator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libnetfs/file-set-translator.c') diff --git a/libnetfs/file-set-translator.c b/libnetfs/file-set-translator.c index 02c55836..bac950e3 100644 --- a/libnetfs/file-set-translator.c +++ b/libnetfs/file-set-translator.c @@ -122,7 +122,7 @@ netfs_S_file_set_translator (struct protid *user, /* Find the device number from the arguments of the translator. */ arg = passive + strlen (passive) + 1; - assert (arg <= passive + passivelen); + assert_backtrace (arg <= passive + passivelen); if (arg == passive + passivelen) { pthread_mutex_unlock (&np->lock); @@ -131,7 +131,7 @@ netfs_S_file_set_translator (struct protid *user, major = strtol (arg, 0, 0); arg = arg + strlen (arg) + 1; - assert (arg < passive + passivelen); + assert_backtrace (arg < passive + passivelen); if (arg == passive + passivelen) { pthread_mutex_unlock (&np->lock); @@ -147,7 +147,7 @@ netfs_S_file_set_translator (struct protid *user, case S_IFLNK: arg = passive + strlen (passive) + 1; - assert (arg <= passive + passivelen); + assert_backtrace (arg <= passive + passivelen); if (arg == passive + passivelen) { pthread_mutex_unlock (&np->lock); -- cgit v1.2.3