diff options
author | JackLivio <jack@livio.io> | 2019-03-26 10:05:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-26 10:05:25 -0400 |
commit | 7bdc752cb8a1e6132d3319216170fed507dbabbc (patch) | |
tree | 9c3147982897114c3b5a54796e90600c120efb1e /src/components/policy/policy_regular/src/sql_pt_representation.cc | |
parent | 65ed7ed46b8470e0aebab1464fff28cf686d04b5 (diff) | |
download | sdl_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/policy/policy_regular/src/sql_pt_representation.cc')
-rw-r--r-- | src/components/policy/policy_regular/src/sql_pt_representation.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/policy/policy_regular/src/sql_pt_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc index 19133a45f8..604e69f6fa 100644 --- a/src/components/policy/policy_regular/src/sql_pt_representation.cc +++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc @@ -1800,8 +1800,14 @@ bool SQLPTRepresentation::GatherAppServiceParameters( handled_rpc); } - service_name_query.Reset(); - handled_rpcs_query.Reset(); + if (!service_name_query.Reset()) { + LOG4CXX_ERROR(logger_, "Could not reset service_name query"); + return false; + } + if (!handled_rpcs_query.Reset()) { + LOG4CXX_ERROR(logger_, "Could not reset handled_rpcs query"); + return false; + } } return true; |