Skip to content

Commit 3df109d

Browse files
committed
mailinfo: remove misguided assert() statement
The idea of this assert() statement was to test, in debug mode, that the check_header() function actually finds anything. However, enclosing the call to that function in an assert() makes it fair game for smart compilers *to skip the call in release mode*. Which is not at all what we want here. Remember: just because it works with GCC does not mean that it is correct. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ea3baf8 commit 3df109d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mailinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static void flush_inbody_header_accum(struct mailinfo *mi)
710710
{
711711
if (!mi->inbody_header_accum.len)
712712
return;
713-
assert(check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0));
713+
check_header(mi, &mi->inbody_header_accum, mi->s_hdr_data, 0);
714714
strbuf_reset(&mi->inbody_header_accum);
715715
}
716716

0 commit comments

Comments
 (0)