Re: [PATCH 08/31] notes: make hash size independent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 11, 2019 at 8:23 PM brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
> Switch out various uses of the GIT_SHA1_* constants with GIT_MAX_*
> constants for allocations and the_hash_algo for general parsing.  Update
> a comment to no longer be SHA-1 specific.
>
> Signed-off-by: brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx>
> ---
> diff --git a/notes.c b/notes.c
> @@ -527,15 +529,15 @@ static unsigned char determine_fanout(struct int_node *tree, unsigned char n,
> -/* hex SHA1 + 19 * '/' + NUL */
> -#define FANOUT_PATH_MAX GIT_SHA1_HEXSZ + FANOUT_PATH_SEPARATORS + 1
> +/* hex oid + one slash between each pair + NUL */
> +#define FANOUT_PATH_MAX GIT_MAX_HEXSZ + FANOUT_PATH_SEPARATORS_MAX + 1

I had trouble understanding to what pair you are referring. I _think_
you mean "pair of hex digits". If so, perhaps:

    /* hex oid + '/' between each pair of hex digits + NUL */

(but not worth a re-roll).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux