OSDN Git Service

tools: btmgmt: Add missing return after g_main_loop_quit()
authorAnderson Lizardo <anderson.lizardo@openbossa.org>
Tue, 19 Feb 2013 21:00:03 +0000 (17:00 -0400)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 20 Feb 2013 08:00:46 +0000 (10:00 +0200)
This change keeps semantic of previous code that used to call exit()
directly.

tools/btmgmt.c

index 9753724..4650876 100644 (file)
@@ -135,8 +135,10 @@ static void discovering(uint16_t index, uint16_t len, const void *param,
                return;
        }
 
-       if (ev->discovering == 0 && discovery)
+       if (ev->discovering == 0 && discovery) {
                g_main_loop_quit(event_loop);
+               return;
+       }
 
        if (monitor)
                printf("hci%u type %u discovering %s\n", index,