Merge branch 'ep/maint-equals-null-cocci' for maint-2.35

* ep/maint-equals-null-cocci:
  tree-wide: apply equals-null.cocci
  contrib/coccinnelle: add equals-null.cocci
This commit is contained in:
Junio C Hamano
2022-05-02 10:06:00 -07:00
64 changed files with 171 additions and 141 deletions

View File

@ -116,7 +116,7 @@ int load_idx(const char *path, const unsigned int hashsz, void *idx_map,
if (idx_size < 4 * 256 + hashsz + hashsz)
return error("index file %s is too small", path);
if (idx_map == NULL)
if (!idx_map)
return error("empty data");
if (hdr->idx_signature == htonl(PACK_IDX_SIGNATURE)) {