mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'ep/maint-equals-null-cocci'
Introduce and apply coccinelle rule to discourage an explicit comparison between a pointer and NULL, and applies the clean-up to the maintenance track. * ep/maint-equals-null-cocci: tree-wide: apply equals-null.cocci tree-wide: apply equals-null.cocci contrib/coccinnelle: add equals-null.cocci
This commit is contained in:
@@ -218,7 +218,7 @@ int bitmap_is_subset(struct bitmap *self, struct bitmap *other)
|
||||
|
||||
void bitmap_free(struct bitmap *bitmap)
|
||||
{
|
||||
if (bitmap == NULL)
|
||||
if (!bitmap)
|
||||
return;
|
||||
|
||||
free(bitmap->words);
|
||||
|
||||
@@ -451,7 +451,7 @@ struct ewah_bitmap *ewah_pool_new(void)
|
||||
|
||||
void ewah_pool_free(struct ewah_bitmap *self)
|
||||
{
|
||||
if (self == NULL)
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
if (bitmap_pool_size == BITMAP_POOL_MAX ||
|
||||
|
||||
Reference in New Issue
Block a user