summaryrefslogtreecommitdiff
path: root/trans/magic.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 /trans/magic.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 'trans/magic.c')
-rw-r--r--trans/magic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/trans/magic.c b/trans/magic.c
index a033db9a..e38efcae 100644
--- a/trans/magic.c
+++ b/trans/magic.c
@@ -34,7 +34,7 @@
#include <limits.h>
#include <argp.h>
#include <argz.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include "fsys_S.h"
@@ -167,7 +167,7 @@ magic_getroot (struct trivfs_control *cntl,
*node_type = MACH_MSG_TYPE_COPY_SEND;
err = mach_port_deallocate (mach_task_self (), dotdot);
- assert_perror (err);
+ assert_perror_backtrace (err);
return 0;
}
@@ -313,10 +313,10 @@ trivfs_S_dir_lookup (struct trivfs_protid *cred,
}
err = mach_port_mod_refs (mach_task_self (), dotdot,
MACH_PORT_RIGHT_SEND, +1);
- assert_perror (err);
+ assert_perror_backtrace (err);
err = mach_port_mod_refs (mach_task_self (), cred->realnode,
MACH_PORT_RIGHT_SEND, +1);
- assert_perror (err);
+ assert_perror_backtrace (err);
*retry_type = FS_RETRY_NORMAL;
*retry_name = '\0';