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. --- libstore/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libstore/device.c') diff --git a/libstore/device.c b/libstore/device.c index 3a72df48..b350bc7b 100644 --- a/libstore/device.c +++ b/libstore/device.c @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -#include +#include #include #include #include @@ -146,7 +146,7 @@ enforced (struct store *store) if (!err) { - assert (sizes_len == DEV_GET_RECORDS_COUNT); + assert_backtrace (sizes_len == DEV_GET_RECORDS_COUNT); if (sizes[DEV_GET_RECORDS_RECORD_SIZE] != store->block_size || (store->runs[0].length != @@ -165,7 +165,7 @@ enforced (struct store *store) if (err) return EINVAL; - assert (sizes_len == DEV_GET_SIZE_COUNT); + assert_backtrace (sizes_len == DEV_GET_SIZE_COUNT); if (sizes[DEV_GET_SIZE_RECORD_SIZE] != store->block_size || (store->runs[0].length != -- cgit v1.2.3