OSDN Git Service

Bluetooth: Remove unnecessary early initialization of variable
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 11 Sep 2014 00:37:41 +0000 (17:37 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 11 Sep 2014 00:45:24 +0000 (02:45 +0200)
commit3a7dbfb8ff943711be4221df978254ad2bc1ac46
tree47bf1c11fbd6262e51092228e049e067cef6ab25
parent196332f5a1e5c3ec7171742fce83d03795abf120
Bluetooth: Remove unnecessary early initialization of variable

We do nothing else with the auth variable in smp_cmd_pairing_rsp()
besides passing it to tk_request() which in turn only cares about
whether one of the sides had the MITM bit set. It is therefore
unnecessary to assign a value to it until just before calling
tk_request(), and this value can simply be the bit-wise or of the local
and remote requirements.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c