At Tue, 07 Aug 2012 20:07:48 +0800, Liu Yuan wrote: > > On 08/07/2012 07:55 PM, MORITA Kazutaka wrote: > > If the first byte of entry->raw.sha1 is zero, strlen(entry->raw.sha1) > > returns zero. What this function wants to do is to check > > entry->raw.sha1 is filled with zero, isn't it? > > Yes, your fix looks okay but I thought you have met some segfault like problem > caused by this line,
I've not ever met any problems yet. I just noticed that the usage of strlen is wrong. I think the old code doesn't cause fatal problems like segfault, but causes a redundant write to the farm backend store when the sha1 value starts with zero. Thanks, Kazutaka -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
