[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 04/19] libccs: fix error checking



Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto redhat com>
---
:100644 100644 6a2b143... d9cddc0... M	config/libs/libccsconfdb/libccs.c
 config/libs/libccsconfdb/libccs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/libs/libccsconfdb/libccs.c b/config/libs/libccsconfdb/libccs.c
index 6a2b143..d9cddc0 100644
--- a/config/libs/libccsconfdb/libccs.c
+++ b/config/libs/libccsconfdb/libccs.c
@@ -414,7 +414,7 @@ static int check_cluster_name(int ccs_handle, const char *cluster_name)
 	size_t datalen = 0;
 
 	handle = confdb_connect();
-	if (handle < 0)
+	if (handle == -1)
 		return -1;
 
 	if (confdb_object_find_start(handle, OBJECT_PARENT_HANDLE) != CS_OK) {
@@ -472,7 +472,7 @@ static int _ccs_get(int desc, const char *query, char **rtn, int list)
 	*rtn = NULL;
 
 	handle = confdb_connect();
-	if (handle < 0)
+	if (handle == -1)
 		return -1;
 
 	connection_handle = find_ccs_handle(handle, desc);
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]