config: flip return value of store_write_*()
commitd9bd4cbb9cce9f872cc4427d1c27a62c6768b12a
authorJeff King <peff@peff.net>
Wed, 13 Sep 2017 17:17:57 +0000 (13 13:17 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Sep 2017 06:18:00 +0000 (14 15:18 +0900)
tree019bcc8e3e8d5a4d3e97061ecb2441e6710dc632
parent634eb82b1aa142e2743acd836447002fd9ebfa10
config: flip return value of store_write_*()

The store_write_section() and store_write_pairs() functions
are basically high-level wrappers around write(). But their
return values are flipped from our usual convention, using
"1" for success and "0" for failure.

Let's flip them to follow the usual write() conventions and
update all callers. As these are local to config.c, it's
unlikely that we'd have new callers in any topics in flight
(which would be silently broken by our change). But just to
be on the safe side, let's rename them to just
write_section() and write_pairs().  That also accentuates
their relationship with write().

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