Re: [PATCH] Receive-pack: include entire SHA1 in nonce
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 25, 2014, 16:23 UTC
- Message-ID
- <xmqqoau3brf1.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1411657340-62950-1-git-send-email-brian@gernhardtsoftware.com>
Brian Gernhardt <brian@gernhardtsoftware.com> writes:
Show 14 quoted lines
> clang gives the following warning: > > builtin/receive-pack.c:327:35: error: sizeof on array function > parameter will return size of 'unsigned char *' instead of 'unsigned > char [20]' [-Werror,-Wsizeof-array-argument] > git_SHA1_Update(&ctx, out, sizeof(out)); > ^ > builtin/receive-pack.c:292:37: note: declared here > static void hmac_sha1(unsigned char out[20], > ^ > --- > > I dislike changing sizeof to a magic constant, but clang informs me that > sizeof is doing the wrong thing.
Thanks. I knew the code was wrong when I wrote it but somehow it ended up as I wrote X-<. Let me find a brown paper bag ;-)