summaryrefslogtreecommitdiff
path: root/nfsd
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 /nfsd
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 'nfsd')
-rw-r--r--nfsd/cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nfsd/cache.c b/nfsd/cache.c
index 1b2b6ee9..c9d80916 100644
--- a/nfsd/cache.c
+++ b/nfsd/cache.c
@@ -22,7 +22,7 @@
#include <string.h>
#include <sys/mman.h>
#include <hurd/fsys.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <string.h>
#include <pthread.h>
#include <hurd/io.h>
@@ -59,7 +59,7 @@ idspec_compare (struct idspec *i, int nuids, int ngids,
|| i->ngids != ngids)
return 0;
- assert (sizeof (int) == sizeof (uid_t));
+ assert_backtrace (sizeof (int) == sizeof (uid_t));
if (bcmp (i->uids, uids, nuids * sizeof (uid_t))
|| bcmp (i->gids, gids, ngids * sizeof (gid_t)))
@@ -103,7 +103,7 @@ idspec_lookup (int nuids, int ngids, int *uids, int *gids)
return i;
}
- assert (sizeof (uid_t) == sizeof (int));
+ assert_backtrace (sizeof (uid_t) == sizeof (int));
i = malloc (sizeof (struct idspec));
i->nuids = nuids;
i->ngids = ngids;
@@ -202,7 +202,7 @@ void
cred_ref (struct idspec *i)
{
pthread_spin_lock (&idhashlock);
- assert (i->references);
+ assert_backtrace (i->references);
i->references++;
pthread_spin_unlock (&idhashlock);
}