summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-24 13:12:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-24 20:35:44 (GMT)
commita263ea84d1da2c34ed1325809b8a1f62ccffde8c (patch)
tree29a2b7b1998689f440b7a61a22373af0e43dc09c /config.c
parent3d42034a18297bc014e2132121c4854f5a07fe4c (diff)
downloadgit-a263ea84d1da2c34ed1325809b8a1f62ccffde8c.zip
git-a263ea84d1da2c34ed1325809b8a1f62ccffde8c.tar.gz
git-a263ea84d1da2c34ed1325809b8a1f62ccffde8c.tar.bz2
config: drop unused parameter from maybe_remove_section()
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/config.c b/config.c
index ff521eb..24ad1a9 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,
&copy_end,
&replace_end, &i);
/*