diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2015-03-12 12:30:53 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-03-12 12:34:50 +0100 |
commit | 247aa7074a41e3b4fe0d86200fbd9c87f32c7837 (patch) | |
tree | 78e42f612ef41ccd83eec1d9f3658719a89ebed4 /profiles/network | |
parent | d6abe697786744eca28a9c0da65b003ef761f82c (diff) | |
download | bluez-247aa7074a41e3b4fe0d86200fbd9c87f32c7837.tar.gz |
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.
Diffstat (limited to 'profiles/network')
-rw-r--r-- | profiles/network/bnep.c | 9 |
1 files changed, 1 insertions, 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; |