Re: [PATCH v9 2/6] convert.c: stream and early out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.05.16 22:29, Junio C Hamano wrote:
> tboegi@xxxxxx writes:
> 
>> +		if (stats->stat_bits & earlyout)
>> +			break; /* We found what we have been searching for */
> 
> Are we sure if our callers are only interested in just one bit at a
> time?  Otherwise, if we want to ensure all of the given bits are
> set,
> 
> 	if ((stats->stat_bits & earlyout) == earlyout)
>         	break;
> 
> would be necessary.  Otherwise, the "only one bit" assumption on the
> "earlyout" parameter somehow needs to be documented in the code.
Thanks for pointing that out.
I have changed the code a couple of times, forth and back.
I want to re-roll the series anyway (probably in the next weeks),
so something like "search_only_flags" may be a better name.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]