On Thu, May 14, 2009 at 9:59 AM, Iain Hibbert <[email protected]> wrote: > On Thu, 14 May 2009, Maksim Yevmenkin wrote: > >> >> 2.1 spec says 1.28 -> 61.44 seconds range is acceptable (0x01->0x30) >> >> ok, do you like something like >> >> + if (length <= 0) >> + length = 5; >> + else if (length == 1) >> + length = 2; >> + else if (length > 61) >> + length = 61; > > yes that is what I have too, except I've allowed 62 (as 61 gives 0x2f)
cool. its in :) == Author: emax Date: Thu May 14 17:10:19 2009 New Revision: 192113 URL: http://svn.freebsd.org/changeset/base/192113 Log: Avoid floating point arithmetic while calculating iquiry length. Submitted by: Iain Hibbert < plunky -at- rya-online -dot- net > MFC after: 1 week Modified: head/lib/libbluetooth/hci.c Modified: head/lib/libbluetooth/hci.c == thanks, max _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth To unsubscribe, send any mail to "[email protected]"
