On Thu 10 Mar 2016 09:35:32 PM CET, Eric Blake wrote:
>> @@ -572,6 +572,10 @@ static unsigned int qapi_event_throttle_hash(const void
>> *key)
>> hash += g_str_hash(qdict_get_str(evstate->data, "id"));
>> }
>>
>> + if (evstate->event == QAPI_EVENT_QUORUM_REPORT_BAD) {
>> + hash += g_str_hash(qdict_get_str(evstate->data, "node-name"));
>
> Is ^= any better than += when computing hashes, so that carry bits
> aren't weakening the distribution of bits? But as long as the
> computation is consistent, I'm not too worried, since you were copying
> the line above.
I think the chances of having collisions here are so low (and their
effect so negligible) that I wouldn't worry too much about it.
Berto