You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pe...@apache.org on 2023/04/10 10:51:34 UTC
[celix] 31/32: Fix Coverity 301214 Dereference null return value.
This is an automated email from the ASF dual-hosted git repository.
pengzheng pushed a commit to branch hotfix/coverity_fix
in repository https://gitbox.apache.org/repos/asf/celix.git
commit 71224bb83c252f32cddcc2e325889e71f86737b7
Author: PengZheng <ho...@gmail.com>
AuthorDate: Mon Apr 10 18:32:05 2023 +0800
Fix Coverity 301214 Dereference null return value.
---
libs/framework/include/celix/dm/ServiceDependency_Impl.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libs/framework/include/celix/dm/ServiceDependency_Impl.h b/libs/framework/include/celix/dm/ServiceDependency_Impl.h
index eb31e173..8fc50104 100644
--- a/libs/framework/include/celix/dm/ServiceDependency_Impl.h
+++ b/libs/framework/include/celix/dm/ServiceDependency_Impl.h
@@ -510,9 +510,7 @@ int ServiceDependency<T,I>::invokeCallback(std::function<void(I*, Properties&&)>
const char* value {nullptr};
if (props != nullptr) {
- celix_properties_iterator_t iter = celix_propertiesIterator_construct(props);
- while(celix_propertiesIterator_hasNext(&iter)) {
- key = (const char*) celix_propertiesIterator_nextKey(&iter);
+ CELIX_PROPERTIES_FOR_EACH(props, key) {
value = celix_properties_get(props, key, "");
//std::cout << "got property " << key << "=" << value << "\n";
properties[key] = value;