From 63840f388363cfd0ced37cf2db272bea93df1a31 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Mon, 16 Dec 2013 10:57:38 +0200 Subject: [PATCH] btmgmt: Remove unneeded code --- tools/btmgmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 1d71d74f5..9d417bf88 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -553,10 +553,8 @@ static void user_confirm(uint16_t index, uint16_t len, const void *param, } rsp_len = strlen(rsp); - if (rsp[rsp_len - 1] == '\n') { + if (rsp[rsp_len - 1] == '\n') rsp[rsp_len - 1] = '\0'; - rsp_len--; - } if (rsp[0] == 'y' || rsp[0] == 'Y') mgmt_confirm_reply(mgmt, index, &ev->addr.bdaddr); -- 2.47.3