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

@ -35,7 +35,7 @@ static int count_dir_entries(const char *dirname)
DIR *dir = opendir(dirname);
int len = 0;
struct dirent *d;
if (dir == NULL)
if (!dir)
return 0;
while ((d = readdir(dir))) {