summaryrefslogtreecommitdiff
path: root/src/components/transport_manager/src
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-03-26 10:05:25 -0400
committerGitHub <noreply@github.com>2019-03-26 10:05:25 -0400
commit7bdc752cb8a1e6132d3319216170fed507dbabbc (patch)
tree9c3147982897114c3b5a54796e90600c120efb1e /src/components/transport_manager/src
parent65ed7ed46b8470e0aebab1464fff28cf686d04b5 (diff)
downloadsdl_core-7bdc752cb8a1e6132d3319216170fed507dbabbc.tar.gz
Coverity 5.1 Fixes (#2854)
* Coverity 5.1 Fixes - Check return values - Pass struct by reference - Cast value to match return type * Coverity: Unchecked dynamic cast * Fix missing not typo * Address comments * Address comment
Diffstat (limited to 'src/components/transport_manager/src')
-rw-r--r--src/components/transport_manager/src/cloud/cloud_device.cc4
-rw-r--r--src/components/transport_manager/src/transport_manager_impl.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/components/transport_manager/src/cloud/cloud_device.cc b/src/components/transport_manager/src/cloud/cloud_device.cc
index 184fcc10cc..35510f4cf8 100644
--- a/src/components/transport_manager/src/cloud/cloud_device.cc
+++ b/src/components/transport_manager/src/cloud/cloud_device.cc
@@ -50,6 +50,10 @@ bool CloudDevice::IsSameAs(const Device* other) const {
const CloudDevice* other_cloud_device =
dynamic_cast<const CloudDevice*>(other);
+ if (!other_cloud_device) {
+ return false;
+ }
+
if (host_ != other_cloud_device->GetHost()) {
return false;
}
diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc
index d197882120..a74ddb700e 100644
--- a/src/components/transport_manager/src/transport_manager_impl.cc
+++ b/src/components/transport_manager/src/transport_manager_impl.cc
@@ -131,7 +131,7 @@ void TransportManagerImpl::ReconnectionTimeout() {
}
void TransportManagerImpl::AddCloudDevice(
- const transport_manager::transport_adapter::CloudAppProperties
+ const transport_manager::transport_adapter::CloudAppProperties&
cloud_properties) {
transport_adapter::DeviceType type = transport_adapter::DeviceType::UNKNOWN;
if ((cloud_properties.cloud_transport_type == "WS") ||