config: drop useless length variable in write_pair()
commit6c7e6963c1b6d9a5344345d55dd537e4ab45158f
authorJeff King <peff@peff.net>
Fri, 10 Apr 2020 19:44:45 +0000 (10 15:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Apr 2020 21:47:36 +0000 (10 14:47 -0700)
treeb66a00a9f0ef5a1ef76ad5bd5947cb6dcbfde85f
parentf5914f4b6bcdb517733c761fe5ba9d94471eb01d
config: drop useless length variable in write_pair()

We compute the length of a subset of a string, but then use that length
only to feed a "%.*s" printf placeholder for the same string. We can
just use "%s" to achieve the same thing.

The variable became useless in cb891a5989 (Use a strbuf for building up
section header and key/value pair strings., 2007-12-14), which swapped
out a write() which _did_ use the length for a strbuf_addf() call.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c