celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-341: add missing return value check
Date Sat, 16 Jan 2016 10:15:19 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 5403908a6 -> 79235f0cd


CELIX-341: add missing return value check


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/79235f0c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/79235f0c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/79235f0c

Branch: refs/heads/develop
Commit: 79235f0cd87dc948d8aaa21c7d03e30ed6cf1b30
Parents: 5403908
Author: Bjoern Petri <bpetri@apache.org>
Authored: Sat Jan 16 11:14:58 2016 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Sat Jan 16 11:14:58 2016 +0100

----------------------------------------------------------------------
 shell/private/src/log_command.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/79235f0c/shell/private/src/log_command.c
----------------------------------------------------------------------
diff --git a/shell/private/src/log_command.c b/shell/private/src/log_command.c
index a1f77c1..8b0244a 100644
--- a/shell/private/src/log_command.c
+++ b/shell/private/src/log_command.c
@@ -34,10 +34,11 @@
 celix_status_t logCommand_levelAsString(bundle_context_pt context, log_level_t level, char
**string);
 
 void logCommand_execute(bundle_context_pt context, char *line, FILE *outStream, FILE *errStream)
{
+    celix_status_t status;
     service_reference_pt readerService = NULL;
 
-    bundleContext_getServiceReference(context, (char *) OSGI_LOGSERVICE_READER_SERVICE_NAME,
&readerService);
-    if (readerService != NULL) {
+    status = bundleContext_getServiceReference(context, (char *) OSGI_LOGSERVICE_READER_SERVICE_NAME,
&readerService);
+    if (status != CELIX_SUCCESS || readerService != NULL) {
         linked_list_pt list = NULL;
         linked_list_iterator_pt iter = NULL;
         log_reader_service_pt reader = NULL;


Mime
View raw message