Merge branch 'gl/cleanup'

* gl/cleanup:
  Convert memset(hash,0,20) to hashclr(hash).
  Convert memcpy(a,b,20) to hashcpy(a,b).
This commit is contained in:
Junio C Hamano
2006-08-26 01:06:22 -07:00
35 changed files with 90 additions and 83 deletions

View File

@ -218,6 +218,14 @@ static inline int hashcmp(const unsigned char *sha1, const unsigned char *sha2)
{
return memcmp(sha1, sha2, 20);
}
static inline void hashcpy(unsigned char *sha_dst, const unsigned char *sha_src)
{
memcpy(sha_dst, sha_src, 20);
}
static inline void hashclr(unsigned char *hash)
{
memset(hash, 0, 20);
}
int git_mkstemp(char *path, size_t n, const char *template);