tree-wide: apply equals-null.cocci

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2022-05-02 10:09:21 -07:00
parent 2b0a58d164
commit 72a4ea71e5
3 changed files with 9 additions and 9 deletions

View File

@ -16,7 +16,7 @@ struct tree_node *tree_search(void *key, struct tree_node **rootp,
int insert)
{
int res;
if (*rootp == NULL) {
if (!*rootp) {
if (!insert) {
return NULL;
} else {
@ -50,7 +50,7 @@ void infix_walk(struct tree_node *t, void (*action)(void *arg, void *key),
void tree_free(struct tree_node *t)
{
if (t == NULL) {
if (!t) {
return;
}
if (t->left) {