From 247aa7074a41e3b4fe0d86200fbd9c87f32c7837 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Thu, 12 Mar 2015 12:30:53 +0100 Subject: [PATCH] profiles/network: Remove not needed checks bnep_setup_decode returns success only if destination UUID is valid so no need to double check that in caller. --- profiles/network/bnep.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c index 25de46c05..adddc33e2 100644 --- a/profiles/network/bnep.c +++ b/profiles/network/bnep.c @@ -649,19 +649,12 @@ int bnep_server_add(int sk, char *bridge, char *iface, const bdaddr_t *addr, /* Processing BNEP_SETUP_CONNECTION_REQUEST_MSG */ rsp = bnep_setup_decode(sk, req, &dst); - if (rsp != BNEP_SUCCESS || !dst) { - err = -rsp; + if (rsp != BNEP_SUCCESS) { error("bnep: error while decoding setup connection request: %d", rsp); goto reply; } - if (!dst) { - error("bnep: cannot decode proper destination service UUID"); - rsp = BNEP_CONN_INVALID_DST; - goto reply; - } - err = bnep_connadd(sk, dst, iface); if (err < 0) { rsp = BNEP_CONN_NOT_ALLOWED; -- 2.47.3