OSDN Git Service

android/client: Fix uninitialized variable
authorJerzy Kasenberg <jerzy.kasenberg@tieto.com>
Mon, 4 Nov 2013 09:55:40 +0000 (10:55 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 4 Nov 2013 10:14:18 +0000 (12:14 +0200)
Pin accept variable was intended to be set to 1
only when pin was typed by user. If no pin was given
accept should be set to 0. This patch fixes this.

android/client/if-bt.c

index 43e8788..fb1b3f3 100644 (file)
@@ -605,7 +605,7 @@ static void pin_reply_p(int argc, const char **argv)
        bt_bdaddr_t addr;
        bt_pin_code_t pin;
        int pin_len = 0;
-       int accept;
+       int accept = 0;
 
        RETURN_IF_NULL(if_bluetooth);
        VERIFY_ADDR_ARG(2, &addr);