diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-05-02 10:15:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-05-02 10:15:55 -0700 |
| commit | 7710d1be607a7c8549ddb560dda2dd97ff38ab7a (patch) | |
| tree | 99aa46ec9597bc7292c1168ed2c04d4a9f3322cb /packfile.c | |
| parent | 6cd33dceed60949e2dbc32e3f0f5e67c4c882e1e (diff) | |
| parent | 72a4ea71e5f29e4078363e87e4471128ff713a62 (diff) | |
| download | git-7710d1be607a7c8549ddb560dda2dd97ff38ab7a.tar.xz | |
Merge branch 'ep/maint-equals-null-cocci' into ep/equals-null-cocci
* ep/maint-equals-null-cocci:
tree-wide: apply equals-null.cocci
tree-wide: apply equals-null.cocci
contrib/coccinnelle: add equals-null.cocci
Diffstat (limited to 'packfile.c')
| -rw-r--r-- | packfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c index 835b2d2716..6b88a56025 100644 --- a/packfile.c +++ b/packfile.c @@ -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)) { |
