summaryrefslogtreecommitdiff
path: root/isofs/rr.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 /isofs/rr.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 'isofs/rr.c')
-rw-r--r--isofs/rr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/isofs/rr.c b/isofs/rr.c
index 59205da1..85aa5695 100644
--- a/isofs/rr.c
+++ b/isofs/rr.c
@@ -280,7 +280,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
nmbuf = malloc ((nmbufsize = nmlen) + 1);
else
nmbuf = realloc (nmbuf, (nmbufsize += nmlen) + 1);
- assert (nmbuf);
+ assert_backtrace (nmbuf);
memcpy (nmbuf + nmbufsize - nmlen, nm->name, nmlen);
@@ -307,7 +307,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
if (name != nmbuf)
{
rr->name = strdup (name);
- assert (rr->name);
+ assert_backtrace (rr->name);
}
else
{
@@ -373,7 +373,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
}
else while (targused + cnamelen > targalloced)
rr->target = realloc (rr->target, targalloced *= 2);
- assert (rr->target);
+ assert_backtrace (rr->target);
memcpy (rr->target + targused, cname, cnamelen);
targused += cnamelen;
@@ -389,7 +389,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
slbuf = malloc (slbufsize = crlen);
else
slbuf = realloc (slbuf, slbufsize += crlen);
- assert (slbuf);
+ assert_backtrace (slbuf);
memcpy (slbuf + slbufsize - crlen, sl->data, crlen);
@@ -572,7 +572,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
rr->translen = tr->len;
rr->trans = malloc (rr->translen);
- assert (rr->trans);
+ assert_backtrace (rr->trans);
memcpy (tr->data, rr->trans, rr->translen);
rr->valid |= VALID_TR;