]> git.ipfire.org Git - thirdparty/git.git/commit - ref-filter.c
ref-filter: avoid using `unsigned long` for catch-all data type
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 20 Apr 2017 20:52:09 +0000 (22:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Apr 2017 05:07:15 +0000 (22:07 -0700)
commite467dc148d0375ed83300589281f749fcbdd690d
tree2808489f8151880723612b519662d662c059b3c4
parent6a2c2f8d34fa1e8f3bb85d159d354810ed63692e
ref-filter: avoid using `unsigned long` for catch-all data type

In its `atom_value` struct, the ref-filter source code wants to store
different values in a field called `ul` (for `unsigned long`), e.g.
timestamps.

However, as we are about to switch the data type of timestamps away from
`unsigned long` (because it may be 32-bit even when `time_t` is 64-bit),
that data type is not large enough.

Simply change that field to use `uintmax_t` instead.

This patch is a bit larger than the mere change of the data type
because the field's name was tied to its data type, which has been fixed
at the same time.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c