On 08/07/2012 07:11 PM, MORITA Kazutaka wrote:
>  static inline int trunk_entry_no_sha1(struct trunk_entry_incore *entry)
>  {
> -     return !strlen((char *)entry->raw.sha1);
> +     unsigned char empty[SHA1_LEN] = {0};
> +
> +     return memcmp(entry->raw.sha1, empty, SHA1_LEN) == 0;
>  }
>  
>  static inline void put_entry(struct trunk_entry_incore *entry)
> -- 

Could you explain what kind of problem the old code is?

-- 
thanks,
Yuan
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to