public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - misc: port config to the new corosync API
@ 2009-04-27  8:55 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-04-27  8:55 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d1956595c749902743e1f54dc4df2c16083d052a
Commit:        d1956595c749902743e1f54dc4df2c16083d052a
Parent:        f3e8b38b29c665b5b4b22e4e8aa95218df914d08
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Mon Apr 27 10:47:50 2009 +0200
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Mon Apr 27 10:54:56 2009 +0200

misc: port config to the new corosync API

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 config/libs/libccsconfdb/fullxpath.c |    4 +---
 config/libs/libccsconfdb/libccs.c    |   20 +++++++++++---------
 config/libs/libccsconfdb/xpathlite.c |    6 +++---
 config/tools/ldap/confdb2ldif.c      |    6 +++---
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/config/libs/libccsconfdb/fullxpath.c b/config/libs/libccsconfdb/fullxpath.c
index 7d9a86e..994c8d8 100644
--- a/config/libs/libccsconfdb/fullxpath.c
+++ b/config/libs/libccsconfdb/fullxpath.c
@@ -51,11 +51,9 @@ static int dump_objdb_buff(confdb_handle_t dump_handle, hdb_handle_t cluster_han
 	hdb_handle_t object_handle;
 	char temp[PATH_MAX];
 	char object_name[PATH_MAX];
-	int object_name_len;
 	char key_name[PATH_MAX];
-	int key_name_len;
 	char key_value[PATH_MAX];
-	int key_value_len;
+	size_t key_value_len = 0, key_name_len = 0, object_name_len = 0;
 	int res;
 
 	res = confdb_key_iter_start(dump_handle, parent_object_handle);
diff --git a/config/libs/libccsconfdb/libccs.c b/config/libs/libccsconfdb/libccs.c
index c24bead..05d08c3 100644
--- a/config/libs/libccsconfdb/libccs.c
+++ b/config/libs/libccsconfdb/libccs.c
@@ -60,9 +60,10 @@ static hdb_handle_t find_libccs_handle(confdb_handle_t handle)
 
 static hdb_handle_t find_ccs_handle(confdb_handle_t handle, int ccs_handle)
 {
-	int res, datalen = 0, found = 0;
+	int res, found = 0;
 	hdb_handle_t libccs_handle = 0, connection_handle = 0;
 	char data[128];
+	size_t datalen = 0;
 
 	libccs_handle = find_libccs_handle(handle);
 	if (libccs_handle == -1)
@@ -113,7 +114,7 @@ static int get_running_config_version(confdb_handle_t handle, int *config_versio
 {
 	hdb_handle_t cluster_handle;
 	char data[128];
-	int datalen = 0;
+	size_t datalen = 0;
 	int ret = -1;
 
 	if (confdb_object_find_start(handle, OBJECT_PARENT_HANDLE) != CS_OK) {
@@ -145,7 +146,7 @@ static int get_stored_config_version(confdb_handle_t handle,
 				     hdb_handle_t connection_handle, int *config_version)
 {
 	char data[128];
-	int datalen = 0;
+	size_t datalen = 0;
 	int ret = -1;
 
 	if (confdb_key_get
@@ -165,7 +166,7 @@ static int set_stored_config_version(confdb_handle_t handle,
 			      hdb_handle_t connection_handle, int new_version)
 {
 	char temp[PATH_MAX];
-	int templen = 0;
+	size_t templen = 0;
 	char data[128];
 
 	memset(data, 0, sizeof(data));
@@ -303,7 +304,7 @@ static hdb_handle_t get_ccs_handle(confdb_handle_t handle, int *ccs_handle,
 int get_previous_query(confdb_handle_t handle, hdb_handle_t connection_handle,
 		       char *previous_query, hdb_handle_t *query_handle)
 {
-	int datalen;
+	size_t datalen = 0;
 
 	if (confdb_key_get
 	    (handle, connection_handle, "previous_query",
@@ -323,7 +324,7 @@ int set_previous_query(confdb_handle_t handle, hdb_handle_t connection_handle,
 		       char *previous_query, hdb_handle_t query_handle)
 {
 	char temp[PATH_MAX];
-	int templen;
+	size_t templen = 0;
 	unsigned int temphandle;
 
 	if (confdb_key_get
@@ -409,7 +410,8 @@ static int check_cluster_name(int ccs_handle, const char *cluster_name)
 	confdb_handle_t handle = 0;
 	hdb_handle_t cluster_handle;
 	char data[128];
-	int found = 0, datalen = 0;
+	int found = 0;
+	size_t datalen = 0;
 
 	handle = confdb_connect();
 	if (handle < 0)
@@ -464,7 +466,7 @@ static int _ccs_get(int desc, const char *query, char **rtn, int list)
 	confdb_handle_t handle = 0;
 	hdb_handle_t connection_handle = 0;
 	char data[128];
-	int datalen = 0;
+	size_t datalen = 0;
 	int fullxpathint = 0;
 
 	*rtn = NULL;
@@ -580,7 +582,7 @@ int ccs_disconnect(int desc)
 	hdb_handle_t connection_handle = 0;
 	int ret;
 	char data[128];
-	int datalen = 0;
+	size_t datalen = 0;
 	int fullxpathint = 0;
 
 	handle = confdb_connect();
diff --git a/config/libs/libccsconfdb/xpathlite.c b/config/libs/libccsconfdb/xpathlite.c
index 855a323..0c3a46d 100644
--- a/config/libs/libccsconfdb/xpathlite.c
+++ b/config/libs/libccsconfdb/xpathlite.c
@@ -89,7 +89,7 @@ static int path_dive(confdb_handle_t handle, hdb_handle_t *query_handle,
 
 			char *start = NULL, *middle = NULL, *end = NULL;
 			char data[PATH_MAX];
-			int datalen;
+			size_t datalen = 0;
 
 			/*
 			 * those ones should be always good because
@@ -222,13 +222,13 @@ static int get_data(confdb_handle_t handle, hdb_handle_t connection_handle,
 		    hdb_handle_t query_handle, hdb_handle_t *list_handle,
 		    char **rtn, char *curpos, int list, int is_oldlist)
 {
-	int datalen, cmp;
+	int cmp;
 	char data[PATH_MAX];
 	char resval[PATH_MAX];
 	char keyval[PATH_MAX];
-	int keyvallen = PATH_MAX;
 	hdb_handle_t new_obj_handle;
 	unsigned int value = 0;
+	size_t datalen = 0, keyvallen = PATH_MAX;
 
 	memset(data, 0, PATH_MAX);
 	memset(resval, 0, PATH_MAX);
diff --git a/config/tools/ldap/confdb2ldif.c b/config/tools/ldap/confdb2ldif.c
index 4f9dfc8..39e7f0e 100644
--- a/config/tools/ldap/confdb2ldif.c
+++ b/config/tools/ldap/confdb2ldif.c
@@ -59,11 +59,11 @@ static void print_config_tree(confdb_handle_t handle, hdb_handle_t parent_object
 {
 	hdb_handle_t object_handle;
 	char object_name[1024];
-	int object_name_len;
+	size_t object_name_len;
 	char key_name[1024];
-	int key_name_len;
+	size_t key_name_len;
 	char key_value[1024];
-	int key_value_len;
+	size_t key_value_len;
 	char cumulative_dn[4096];
 	int res;
 	int i;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-27  8:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-27  8:55 cluster: master - misc: port config to the new corosync API Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).