summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-01-17 15:11:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-17 15:11:06 -0800
commit943c9a7b867210f283d588e1b790d0197b66fde8 (patch)
treeba347600b2613461d0691d965215de3b054a9fca
parentMerge branch 'jk/index-pack-wo-repo-from-stdin' into maint (diff)
parentmailinfo.c: move side-effects outside of assert (diff)
downloadtgif-943c9a7b867210f283d588e1b790d0197b66fde8.tar.xz
Merge branch 'jt/mailinfo-fold-in-body-headers' into maint
Fix for NDEBUG builds. * jt/mailinfo-fold-in-body-headers: mailinfo.c: move side-effects outside of assert
-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);
}