提交 294b2680 编写于 作者: R René Scharfe 提交者: Junio C Hamano

use strbuf_addch for adding single characters

Signed-off-by: NRene Scharfe <l.s.r@web.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e992d1eb
......@@ -171,7 +171,7 @@ static void output(struct merge_options *o, int v, const char *fmt, ...)
strbuf_vaddf(&o->obuf, fmt, ap);
va_end(ap);
strbuf_add(&o->obuf, "\n", 1);
strbuf_addch(&o->obuf, '\n');
if (!o->buffer_output)
flush_output(o);
}
......
......@@ -338,7 +338,7 @@ static void NORETURN unsupported_magic(const char *pattern,
if (!(magic & m->bit))
continue;
if (sb.len)
strbuf_addstr(&sb, " ");
strbuf_addch(&sb, ' ');
if (short_magic & m->bit)
strbuf_addf(&sb, "'%c'", m->mnemonic);
else
......
......@@ -121,7 +121,7 @@ void end_url_with_slash(struct strbuf *buf, const char *url)
{
strbuf_addstr(buf, url);
if (buf->len && buf->buf[buf->len - 1] != '/')
strbuf_addstr(buf, "/");
strbuf_addch(buf, '/');
}
void str_end_url_with_slash(const char *url, char **dest) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册