sparse-index: fix uninitialized jump
authorDerrick Stolee <dstolee@microsoft.com>
Mon, 17 May 2021 12:22:17 +0000 (12:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 May 2021 21:29:17 +0000 (06:29 +0900)
commit4279cb1c6e4e5b60b099833d8e3debba4ac35eba
treec1582acf1b70d54161133eaecdcfc06614325c25
parent4589bca829a2ace58bc98876cccd7dbd2e89f732
sparse-index: fix uninitialized jump

While testing the sparse-index, I verified a test with --valgrind and it
complained about an uninitialized value being used in a jump in the
path_matches_pattern_list() method. The line was this one:

if (*dtype == DT_UNKNOWN)

In the call stack, the culprit was the initialization of the dtype
variable in convert_to_sparse_rec().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sparse-index.c