rctest: Fix scan-build warning
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 26 Sep 2022 22:53:41 +0000 (15:53 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
This fixes the following warning:

tools/rctest.c:131:2: warning: 1st function call argument is an
uninitialized value [core.CallAndMessage]
        sdp_list_free(protos, NULL);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/rctest.c

index 93300e9..0b30db6 100755 (executable)
@@ -93,7 +93,7 @@ static float tv2fl(struct timeval tv)
 static uint8_t get_channel(const char *svr, uint16_t uuid)
 {
        sdp_session_t *sdp;
-       sdp_list_t *srch, *attrs, *rsp, *protos;
+       sdp_list_t *srch, *attrs, *rsp, *protos = NULL;
        uuid_t svclass;
        uint16_t attr;
        bdaddr_t dst;