From: Jeff King Date: Thu, 24 Jan 2019 13:12:32 GMT Subject: [PATCH 6/8] config: drop unused parameter from maybe_remove_section() Message-ID: <20190124131232.GF22398@sigill.intra.peff.net> In-Reply-To: <20190124131104.GA24017@sigill.intra.peff.net> We don't need the contents buffer to drop a section; the parse information in the config_store_data parameter is enough for our logic. Signed-off-by: Jeff King --- config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config.c b/config.c index ff521eb27a..24ad1a9854 100644 --- a/config.c +++ b/config.c @@ -2565,7 +2565,6 @@ static ssize_t write_pair(int fd, const char *key, const char *value, * entry (which all are to be removed). */ static void maybe_remove_section(struct config_store_data *store, - const char *contents, size_t *begin_offset, size_t *end_offset, int *seen_ptr) { @@ -2850,7 +2849,7 @@ int git_config_set_multivar_in_file_gently(const char *config_filename, replace_end = store.parsed[j].end; copy_end = store.parsed[j].begin; if (!value) - maybe_remove_section(&store, contents, + maybe_remove_section(&store, ©_end, &replace_end, &i); /* -- 2.20.1.842.g8986705066