summaryrefslogtreecommitdiff
path: root/trans/new-fifo.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/new-fifo.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/new-fifo.c')
-rw-r--r--trans/new-fifo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/trans/new-fifo.c b/trans/new-fifo.c
index c293b764..efa36c24 100644
--- a/trans/new-fifo.c
+++ b/trans/new-fifo.c
@@ -24,7 +24,7 @@
#include <error.h>
#include <string.h>
#include <fcntl.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <pthread.h>
#include <hurd.h>
@@ -536,7 +536,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
else
{
struct pipe *pipe = cred->po->hook;
- assert (pipe);
+ assert_backtrace (pipe);
pthread_mutex_lock (&pipe->lock);
err = pipe_read (pipe, cred->po->openmodes & O_NONBLOCK, NULL,
data, data_len, amount);
@@ -565,7 +565,7 @@ trivfs_S_io_readable (struct trivfs_protid *cred,
else
{
struct pipe *pipe = cred->po->hook;
- assert (pipe);
+ assert_backtrace (pipe);
pthread_mutex_lock (&pipe->lock);
*amount = pipe_readable (pipe, 1);
pthread_mutex_unlock (&pipe->lock);
@@ -835,7 +835,7 @@ trivfs_S_fsys_forward (mach_port_t server,
return EOPNOTSUPP;
server_trans = cred->po->cntl->hook;
- assert (server_trans->server);
+ assert_backtrace (server_trans->server);
argz_extract (argz, argz_len, argv);