summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-02 12:03:42 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-02 19:04:05 +0000
commitccd552a838a2503c558c29369747ffe85e144ab5 (patch)
tree37e16e5d5664035538bb13dda4834e6444dd3a2a
parent7e461a91bf320b509cffea81fc2611bcf6b06935 (diff)
downloadwireshark-ccd552a838a2503c558c29369747ffe85e144ab5.tar.gz
Remove more unnecessary null checks.
These routines are called from dissect_bthci_evt(), which ensures that bluetooth_data is non-null, and passes that non-null value to the routines. Should fix CIDs 1306908 and 1306911. Change-Id: Ie25de02f36bda9a9ae25ced034e758fc7f745681 Reviewed-on: https://code.wireshark.org/review/9472 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/packet-bthci_evt.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c
index 02b15c4b0f..ee41d4293d 100644
--- a/epan/dissectors/packet-bthci_evt.c
+++ b/epan/dissectors/packet-bthci_evt.c
@@ -1195,13 +1195,8 @@ dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset,
bluetooth_device_tap_t *tap_device;
tap_device = wmem_new(wmem_packet_scope(), bluetooth_device_tap_t);
- if (bluetooth_data) {
- tap_device->interface_id = bluetooth_data->interface_id;
- tap_device->adapter_id = bluetooth_data->adapter_id;
- } else {
- tap_device->interface_id = HCI_INTERFACE_DEFAULT;
- tap_device->adapter_id = HCI_ADAPTER_DEFAULT;
- }
+ tap_device->interface_id = bluetooth_data->interface_id;
+ tap_device->adapter_id = bluetooth_data->adapter_id;
memcpy(tap_device->bd_addr, bd_addr, 6);
tap_device->has_bd_addr = TRUE;
tap_device->is_local = FALSE;
@@ -1267,13 +1262,8 @@ dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t *tvb, int of
tap_device = wmem_new(wmem_packet_scope(), bluetooth_device_tap_t);
tap_device->type = BLUETOOTH_DEVICE_REMOTE_VERSION;
- if (bluetooth_data) {
- tap_device->interface_id = bluetooth_data->interface_id;
- tap_device->adapter_id = bluetooth_data->adapter_id;
- } else {
- tap_device->interface_id = HCI_INTERFACE_DEFAULT;
- tap_device->adapter_id = HCI_ADAPTER_DEFAULT;
- }
+ tap_device->interface_id = bluetooth_data->interface_id;
+ tap_device->adapter_id = bluetooth_data->adapter_id;
if (remote_bdaddr) {
tap_device->has_bd_addr = TRUE;