提交 ddbea5cf 编写于 作者: A Alfonso Acosta 提交者: Marcel Holtmann

Bluetooth: Remove redundant check on hci_conn's device class

NULL-checking conn->dev_class is pointless since the variable is
defined as an array, i.e. it will always be non-NULL.
Signed-off-by: NAlfonso Acosta <fons@spotify.com>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 fd45ada9
......@@ -6196,8 +6196,7 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn,
eir_len = eir_append_data(ev->eir, 0, EIR_NAME_COMPLETE,
name, name_len);
if (conn->dev_class &&
memcmp(conn->dev_class, "\0\0\0", 3) != 0)
if (memcmp(conn->dev_class, "\0\0\0", 3) != 0)
eir_len = eir_append_data(ev->eir, eir_len,
EIR_CLASS_OF_DEV,
conn->dev_class, 3);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册