summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-02-18 00:07:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-18 00:32:19 (GMT)
commit588e4fb19190c03319a2b67d447dd40f97d85531 (patch)
tree6f0e118ffe8f836b484229d132f886a00b43b8e7 /grep.c
parent47eebd2fd2c576377f40555c539c5fc56af060a0 (diff)
downloadgit-588e4fb19190c03319a2b67d447dd40f97d85531.zip
git-588e4fb19190c03319a2b67d447dd40f97d85531.tar.gz
git-588e4fb19190c03319a2b67d447dd40f97d85531.tar.bz2
grep/pcre2: prepare to add debugging to pcre2_malloc()
Change pcre2_malloc() in a way that'll make it easier for a debugging fprintf() to spew out the allocated pointer. This doesn't introduce any functional change, it just makes a subsequent commit's diff easier to read. Changes code added in 513f2b0bbd4 (grep: make PCRE2 aware of custom allocator, 2019-10-16). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/grep.c b/grep.c
index b9adcd8..f96d86c 100644
--- a/grep.c
+++ b/grep.c
@@ -45,7 +45,8 @@ static pcre2_general_context *pcre2_global_context;
static void *pcre2_malloc(PCRE2_SIZE size, MAYBE_UNUSED void *memory_data)
{
- return malloc(size);
+ void *pointer = malloc(size);
+ return pointer;
}
static void pcre2_free(void *pointer, MAYBE_UNUSED void *memory_data)