From ee5ac2d1b4b82b1f85ca677f336f3ec71cc49a7b Mon Sep 17 00:00:00 2001 From: Taesoo Jun Date: Wed, 12 Sep 2018 11:45:44 +0900 Subject: [PATCH] Remove unused local variable and codes - wait_for_async( ) Change-Id: Ib9c2e29d3ee4f6e4ca3240e3f8633fff15655021 Signed-off-by: Taesoo Jun --- bt-oal/haltest/bluetooth_hal_tc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bt-oal/haltest/bluetooth_hal_tc.cpp b/bt-oal/haltest/bluetooth_hal_tc.cpp index 482c6df..f53d4f4 100644 --- a/bt-oal/haltest/bluetooth_hal_tc.cpp +++ b/bt-oal/haltest/bluetooth_hal_tc.cpp @@ -53,13 +53,14 @@ static gboolean timeout_func(gpointer data) static void wait_for_async(int timeout) { int timeout_id = 0; + mainloop = g_main_loop_new(NULL, FALSE); timeout_id = g_timeout_add(timeout, timeout_func, mainloop); + if (timeout_id < 0) + return; + g_main_loop_run(mainloop); -/* - g_source_remove(timeout_id); -*/ } static void __bt_oal_event_receiver(int event_type, gpointer event_data, gsize len) -- 2.7.4