[PATCH v2 22/22] ui-shared.c: use struct strbuf instead of fmt()
Jason A. Donenfeld
Jason at zx2c4.com
Sun Apr 7 17:21:28 CEST 2013
On Sun, Apr 7, 2013 at 4:26 PM, John Keeping <john at keeping.me.uk> wrote:
> const char *cgit_hosturl()
> {
> + struct strbuf sb = STRBUF_INIT;
This is now unused.
> if (ctx.env.http_host)
> return ctx.env.http_host;
> if (!ctx.env.server_name)
> return NULL;
> if (!ctx.env.server_port || atoi(ctx.env.server_port) == 80)
> return ctx.env.server_name;
> - return xstrdup(fmt("%s:%s", ctx.env.server_name, ctx.env.server_port));
> + return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
> }
More information about the CGit
mailing list