summaryrefslogtreecommitdiff
path: root/libstore/device.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-19 21:20:57 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 18:42:22 +0200
commit835b293d35a209d38047126443d41fa7090daa4c (patch)
tree5bf956895e6030f91cd618fb191b2151f6d25423 /libstore/device.c
parentdc0b5a43224999223a246870912b0f292b1980e9 (diff)
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating errors much easier.
Diffstat (limited to 'libstore/device.c')
-rw-r--r--libstore/device.c6
1 files changed, 3 insertions, 3 deletions
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 <assert.h>
+#include <assert-backtrace.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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 !=