coccinelle: make use of the "type" FREE_AND_NULL() rule
Apply the result of the just-added coccinelle rule. This manually excludes a few occurrences, mostly things that resulted in many FREE_AND_NULL() on one line, that'll be manually fixed in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
cf9f49ea48
commit
6a83d90207
@ -35,8 +35,7 @@ int oid_array_lookup(struct oid_array *array, const struct object_id *oid)
|
||||
|
||||
void oid_array_clear(struct oid_array *array)
|
||||
{
|
||||
free(array->oid);
|
||||
array->oid = NULL;
|
||||
FREE_AND_NULL(array->oid);
|
||||
array->nr = 0;
|
||||
array->alloc = 0;
|
||||
array->sorted = 0;
|
||||
|
||||
Reference in New Issue
Block a user