strbuf_addf(&buf, "+/%s%s",
strcmp("less", pager) ? "" : "*",
opt.pattern_list->pattern);
- string_list_append(&path_list, buf.buf);
- strbuf_detach(&buf, NULL);
+ string_list_append(&path_list,
+ strbuf_detach(&buf, NULL));
}
}
raw = (opt->commit_format == CMIT_FMT_USERFORMAT);
format_display_notes(&commit->object.oid, ¬ebuf,
get_log_output_encoding(), raw);
- ctx.notes_message = notebuf.len
- ? strbuf_detach(¬ebuf, NULL)
- : xcalloc(1, 1);
+ ctx.notes_message = strbuf_detach(¬ebuf, NULL);
}
/*