[sheepdog] [PATCH V4 2/2] collie: optimize 'collie vdi check' command
Liu Yuan
namei.unix at gmail.com
Mon Sep 3 12:23:23 CEST 2012
On 09/02/2012 08:59 PM, Yunkai Zhang wrote:
> --- a/sheep/farm/sha1_file.c
> +++ b/sheep/farm/sha1_file.c
> @@ -257,18 +257,3 @@ int get_sha1_hex(const char *hex, unsigned char *sha1)
> }
> return 0;
> }
> -
> -char *sha1_to_hex(const unsigned char *sha1)
> -{
> - static char buffer[50];
> - static const char hex[] = "0123456789abcdef";
> - char *buf = buffer;
> - int i;
> -
> - for (i = 0; i < SHA1_LEN; i++) {
> - unsigned int val = *sha1++;
> - *buf++ = hex[val >> 4];
> - *buf++ = hex[val & 0xf];
> - }
> - return buffer;
> -}
I'd like to keep it in sha1_file.c. Why you need to put it lib/sha1.c?
Thanks,
Yuan
More information about the sheepdog
mailing list