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. --- procfs/netfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'procfs/netfs.c') diff --git a/procfs/netfs.c b/procfs/netfs.c index 0b3d31aa..9410bddd 100644 --- a/procfs/netfs.c +++ b/procfs/netfs.c @@ -110,7 +110,7 @@ error_t netfs_attempt_readlink (struct iouser *user, struct node *np, if (err) return err; - assert (contents_len == np->nn_stat.st_size); + assert_backtrace (contents_len == np->nn_stat.st_size); memcpy (buf, contents, contents_len); return 0; } @@ -172,7 +172,7 @@ error_t netfs_get_dirents (struct iouser *cred, struct node *dir, return err; /* We depend on the fact that CONTENTS is terminated. */ - assert (contents_len == 0 || contents[contents_len - 1] == '\0'); + assert_backtrace (contents_len == 0 || contents[contents_len - 1] == '\0'); /* Skip to the first requested entry. */ while (contents_len && entry--) -- cgit v1.2.3