summaryrefslogtreecommitdiff
path: root/mailinfo.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-21 14:55:03 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-21 14:55:03 -0800
commitca21186b3347e1a194c92622a7fb0e16f2480471 (patch)
treee6df6a0f85f1ad9c048bbe3ac2dd3b106a01fc39 /mailinfo.c
parent49d45de1e717df76481feedcdd189b64cea1fabb (diff)
parent08414938a26f66988418dfdac03a62b97450056d (diff)
downloadgit-ca21186b3347e1a194c92622a7fb0e16f2480471.tar.gz
Merge branch 'jt/mailinfo-fold-in-body-headers'
Fix for NDEBUG builds. * jt/mailinfo-fold-in-body-headers: mailinfo.c: move side-effects outside of assert
Diffstat (limited to 'mailinfo.c')
-rw-r--r--mailinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mailinfo.c b/mailinfo.c
index 2fb3877ee4..a489d9d0fb 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -710,7 +710,8 @@ static void flush_inbody_header_accum(struct mailinfo *mi)
{
if (!mi->inbody_header_accum.len)
return;
- assert(check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0));
+ if (!check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0))
+ die("BUG: inbody_header_accum, if not empty, must always contain a valid in-body header");
strbuf_reset(&mi->inbody_header_accum);
}