diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 92637ac0bae82d0b88e267b572a51a75299cda5c..b0b5d8f6cb5107f3422d6107fd56f35ef62786f6 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
static void handle_body(void)
{
static void handle_body(void)
{
- int len = 0;
struct strbuf prev = STRBUF_INIT;
/* Skip up to the first boundary */
struct strbuf prev = STRBUF_INIT;
/* Skip up to the first boundary */
}
do {
}
do {
- strbuf_setlen(&line, line.len + len);
-
/* process any boundary lines */
if (*content_top && is_multipart_boundary(&line)) {
/* flush any leftover */
/* process any boundary lines */
if (*content_top && is_multipart_boundary(&line)) {
/* flush any leftover */
handle_filter(&line);
}
handle_filter(&line);
}
- strbuf_reset(&line);
- if (strbuf_avail(&line) < 100)
- strbuf_grow(&line, 100);
- } while ((len = read_line_with_nul(line.buf, strbuf_avail(&line), fin)));
+ } while (!strbuf_getwholeline(&line, fin, '\n'));
handle_body_out:
strbuf_release(&prev);
handle_body_out:
strbuf_release(&prev);