Hi, On Tue, Jul 27, 2010 at 11:08 PM, <ingas@xxxxxxxxxxxxxx> wrote: > If you examine the patch closely, you might notice that the previous > "check for duplicates" implementation was doing the following: > - cycling through the list of so far accumulated UUIDs in EIR and > comparing them to the current one. If duplicate is found, break out of > this cycling loop. Notice, that in the case of a duplicate, (i < > index)condition will be true, where index is the number of accumulated > UUIDs. > - the current implementation performs check for (i == index -1). Well, we > did not need to cycle through the whole array to cmpare to the last item > :) But if my reading of the original intent is correct, we don't want to > put a duplicate UUID in EIR, and, therefore, should go to next iteration > if a duplicate is found. Hence, the check should be (i < index). Yep, the check was already there before you touch it. > Maybe it's a better idea to submit this fix separately. > > I do not disagree that it would be better to check for duplicate records > elsewhere, but this is outside the scope of this patch. No problem, the other patches seems to be in good shape to be push upstream, so lets try to do it this week. -- Luiz Augusto von Dentz Computer Engineer -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html