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. --- nfsd/cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nfsd/cache.c') 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 #include #include -#include +#include #include #include #include @@ -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); } -- cgit v1.2.3