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>
Jeff King committed
Jan 24, 2019 at 08:12 UTC
a263ea84d1da2c34ed1325809b8a1f62ccffde8c
1 file changed
+1
-2
config.c
+1
-2
@@ -2565,7 +2565,6 @@ static ssize_t write_pair(int fd, const char *key, const char *value,
2565
* entry (which all are to be removed).
2566
*/
2567
static void maybe_remove_section(struct config_store_data *store,
2568
- const char *contents,
2568
size_t *begin_offset, size_t *end_offset,
2569
int *seen_ptr)
2570
{
@@ -2850,7 +2849,7 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,
2849
replace_end = store.parsed[j].end;
2850
copy_end = store.parsed[j].begin;
2851
if (!value)
2853
- maybe_remove_section(&store, contents,
2852
+ maybe_remove_section(&store,
2853
©_end,
2854
&replace_end, &i);
2855
/*