[PATCH V3 2/5] Add tools for reading and writing from splitblock table

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

 



On 11/05/2014 12:18 PM, Atsushi Kumagai wrote:
>> +unsigned long long
>> >+read_from_splitblock_table(char *entry)
>> >+{
>> >+	unsigned long long value = 0;
>> >+	int i;
>> >+
>> >+	for (i = splitblock->entry_size; i>  0; i--) {
>> >+		value = value<<  BITPERBYTE;
>> >+		value += *(entry + i - 1)&  0xff;
>> >+	}
> Did you forget to reflect the HATAYAMA-san's comment ?
>

I think it is needed.
For example:
	if *(entry + i - 1) == 0xfa
	without & 0xff:
		it will turn to: value += 0xfffffffffffffffa
	with & 0xff:
		it will be: value += 0xfffffffffffffffa & 0xff

Thanks
Zhou Wenjian



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux