| 38 | } |
| 39 | |
| 40 | static int need_large_offset(off_t offset, const struct pack_idx_option *opts) |
| 41 | { |
| 42 | uint32_t ofsval; |
| 43 | |
| 44 | if ((offset >> 31) || (opts->off32_limit < offset)) |
| 45 | return 1; |
| 46 | if (!opts->anomaly_nr) |
| 47 | return 0; |
| 48 | ofsval = offset; |
| 49 | return !!bsearch(&ofsval, opts->anomaly, opts->anomaly_nr, |
| 50 | sizeof(ofsval), cmp_uint32); |
| 51 | } |
| 52 | |
| 53 | /* |
| 54 | * The *sha1 contains the pack content SHA1 hash. |