OSDN Git Service

lib: Fix use of uninitialized variable in sdp_set_profile_descs
authorSzymon Janc <szymon.janc@tieto.com>
Mon, 30 Sep 2013 13:06:03 +0000 (15:06 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 30 Sep 2013 18:16:41 +0000 (21:16 +0300)
commitcf8a492dfd99563e22b7aa974baf889eb749b19b
treedea759ded2b693f493834646007b2c1b2b17c17c
parentc6e0cd59c4f79f26f356ca02515c2d056111fde8
lib: Fix use of uninitialized variable in sdp_set_profile_descs

Error path on default case was not breaking loop. To keep error
handling similar all error path were converted to use goto.

This fix following:
target  C: libbluetooth <= external/bluetooth/bluez/android/../lib/sdp.c
lib/sdp.c: In function 'sdp_set_profile_descs':
lib/sdp.c:487:10: warning: 'values[0]' may be used uninitialized in
    this function [-Wmaybe-uninitialized]
lib/sdp.c:2562:19: note: 'values[0]' was declared here
lib/sdp.c:545:11: warning: 'dtds[0]' may be used uninitialized in this
    function [-Wmaybe-uninitialized]
lib/sdp.c:2562:9: note: 'dtds[0]' was declared here
lib/sdp.c