OSDN Git Service

Update the usage of fixed_queue.
authorPavlin Radoslavov <pavlin@google.com>
Thu, 8 Oct 2015 01:07:48 +0000 (18:07 -0700)
committerScott James Remnant <keybuk@google.com>
Mon, 19 Oct 2015 17:36:35 +0000 (10:36 -0700)
commit577862e0d87891164a469afcecd1135bf04d1f6e
treefe9f76c4ea7bf31fe1c6bef106c63adf4e10a019
parent5b9b1b89e900fd6f830d25965b1e6a20da559c7f
Update the usage of fixed_queue.

 * Relax non-NULL requirements for fixed_queue by eliminating
   some of the asserts.
   Now, when semantically possible, fixed_queue - related function
   will return the appropriate value even if the queue pointer is NULL.
   This reduces clutter in the code where we had to do anyway
   "if (queue != NULL)" checks.

 * Add non-NULL guards in the few remaining places where
   fixed_queue_get_list(). For now, we need to use this function,
   hence the extra check.
   That function should be eliminated in the future, because all the
   code where it is used violates the semantics of using a queue.

Bug: 24723840
Change-Id: I47632a3515f3d27856d4870e18723d345c040d64
osi/include/fixed_queue.h
osi/src/fixed_queue.c
stack/avdt/avdt_scb_act.c
stack/btm/btm_sec.c
stack/gatt/gatt_sr.c
stack/gatt/gatt_utils.c
stack/l2cap/l2c_fcr.c