use strbuf_addch for adding single characters
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e992d1eb39
commit
294b2680cd
@ -171,7 +171,7 @@ static void output(struct merge_options *o, int v, const char *fmt, ...)
|
|||||||
strbuf_vaddf(&o->obuf, fmt, ap);
|
strbuf_vaddf(&o->obuf, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
strbuf_add(&o->obuf, "\n", 1);
|
strbuf_addch(&o->obuf, '\n');
|
||||||
if (!o->buffer_output)
|
if (!o->buffer_output)
|
||||||
flush_output(o);
|
flush_output(o);
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ static void NORETURN unsupported_magic(const char *pattern,
|
|||||||
if (!(magic & m->bit))
|
if (!(magic & m->bit))
|
||||||
continue;
|
continue;
|
||||||
if (sb.len)
|
if (sb.len)
|
||||||
strbuf_addstr(&sb, " ");
|
strbuf_addch(&sb, ' ');
|
||||||
if (short_magic & m->bit)
|
if (short_magic & m->bit)
|
||||||
strbuf_addf(&sb, "'%c'", m->mnemonic);
|
strbuf_addf(&sb, "'%c'", m->mnemonic);
|
||||||
else
|
else
|
||||||
|
2
url.c
2
url.c
@ -121,7 +121,7 @@ void end_url_with_slash(struct strbuf *buf, const char *url)
|
|||||||
{
|
{
|
||||||
strbuf_addstr(buf, url);
|
strbuf_addstr(buf, url);
|
||||||
if (buf->len && buf->buf[buf->len - 1] != '/')
|
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) {
|
void str_end_url_with_slash(const char *url, char **dest) {
|
||||||
|
Loading…
Reference in New Issue
Block a user