فهرست منبع

change a few "int msg_len" to "size_t msg_len"; adjust docs

* lib/cpg.c (cpg_mcast_joined):
* lib/evs.c (evs_mcast_joined, evs_mcast_groups):
* man/cpg_initialize.3:
* man/evs_initialize.3:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2060 fd59a12c-fef9-0310-b244-a6a79926bd2f
Jim Meyering 17 سال پیش
والد
کامیت
270e9da193
4فایلهای تغییر یافته به همراه18 افزوده شده و 18 حذف شده
  1. 1 1
      lib/cpg.c
  2. 2 2
      lib/evs.c
  3. 10 10
      man/cpg_initialize.3
  4. 5 5
      man/evs_initialize.3

+ 1 - 1
lib/cpg.c

@@ -501,7 +501,7 @@ cs_error_t cpg_mcast_joined (
 	struct iovec iov[64];
 	struct iovec iov[64];
 	struct req_lib_cpg_mcast req_lib_cpg_mcast;
 	struct req_lib_cpg_mcast req_lib_cpg_mcast;
 	struct res_lib_cpg_mcast res_lib_cpg_mcast;
 	struct res_lib_cpg_mcast res_lib_cpg_mcast;
-	int msg_len = 0;
+	size_t msg_len = 0;
 
 
 	error = saHandleInstanceGet (&cpg_handle_t_db, handle, (void *)&cpg_inst);
 	error = saHandleInstanceGet (&cpg_handle_t_db, handle, (void *)&cpg_inst);
 	if (error != CS_OK) {
 	if (error != CS_OK) {

+ 2 - 2
lib/evs.c

@@ -421,7 +421,7 @@ evs_error_t evs_mcast_joined (
 	struct iovec iov[64];
 	struct iovec iov[64];
 	struct req_lib_evs_mcast_joined req_lib_evs_mcast_joined;
 	struct req_lib_evs_mcast_joined req_lib_evs_mcast_joined;
 	struct res_lib_evs_mcast_joined res_lib_evs_mcast_joined;
 	struct res_lib_evs_mcast_joined res_lib_evs_mcast_joined;
-	int msg_len = 0;
+	size_t msg_len = 0;
 
 
 	error = saHandleInstanceGet (&evs_handle_t_db, handle, (void *)&evs_inst);
 	error = saHandleInstanceGet (&evs_handle_t_db, handle, (void *)&evs_inst);
 	if (error != CS_OK) {
 	if (error != CS_OK) {
@@ -478,7 +478,7 @@ evs_error_t evs_mcast_groups (
 	struct iovec iov[64]; /* FIXME: what if iov_len > 62 ?  use malloc */
 	struct iovec iov[64]; /* FIXME: what if iov_len > 62 ?  use malloc */
 	struct req_lib_evs_mcast_groups req_lib_evs_mcast_groups;
 	struct req_lib_evs_mcast_groups req_lib_evs_mcast_groups;
 	struct res_lib_evs_mcast_groups res_lib_evs_mcast_groups;
 	struct res_lib_evs_mcast_groups res_lib_evs_mcast_groups;
-	int msg_len = 0;
+	size_t msg_len = 0;
 
 
 	error = saHandleInstanceGet (&evs_handle_t_db, handle, (void *)&evs_inst);
 	error = saHandleInstanceGet (&evs_handle_t_db, handle, (void *)&evs_inst);
 	if (error != CS_OK) {
 	if (error != CS_OK) {

+ 10 - 10
man/cpg_initialize.3

@@ -1,5 +1,5 @@
 .\"/*
 .\"/*
-.\" * Copyright (c) 2006-2008 Red Hat, Inc.
+.\" * Copyright (c) 2006-2009 Red Hat, Inc.
 .\" *
 .\" *
 .\" * All rights reserved.
 .\" * All rights reserved.
 .\" *
 .\" *
@@ -64,26 +64,26 @@ is called.  The callback functions are described by the following type definitio
 
 
 typedef void (*cpg_deliver_fn_t) (
 typedef void (*cpg_deliver_fn_t) (
         cpg_handle_t handle,
         cpg_handle_t handle,
-        struct cpg_name *group_name,
+        const struct cpg_name *group_name,
         uint32_t nodeid,
         uint32_t nodeid,
         uint32_t pid,
         uint32_t pid,
-        void *msg,
-        int msg_len);
+        const void *msg,
+        size_t msg_len);
 
 
 
 
 typedef void (*cpg_confchg_fn_t) (
 typedef void (*cpg_confchg_fn_t) (
         cpg_handle_t handle,
         cpg_handle_t handle,
-        struct cpg_name *group_name,
-        struct cpg_address *member_list, int member_list_entries,
-        struct cpg_address *left_list, int left_list_entries,
-        struct cpg_address *joined_list, int joined_list_entries);
+        const struct cpg_name *group_name,
+        const struct cpg_address *member_list, size_t member_list_entries,
+        const struct cpg_address *left_list, size_t left_list_entries,
+        const struct cpg_address *joined_list, size_t joined_list_entries);
 
 
 typedef void (*cpg_groups_get_fn_t) (
 typedef void (*cpg_groups_get_fn_t) (
 	cpg_handle_t handle,
 	cpg_handle_t handle,
 	uint32_t group_num,
 	uint32_t group_num,
 	uint32_t group_total,
 	uint32_t group_total,
-	struct cpg_name *group_name,
-	struct cpg_address *member_list, int member_list_entries);
+	const struct cpg_name *group_name,
+	struct cpg_address *member_list, size_t member_list_entries);
 
 
 .ta
 .ta
 .fi
 .fi

+ 5 - 5
man/evs_initialize.3

@@ -62,13 +62,13 @@ is called.  The callback functions are described by the following type definitio
 .ta 4n 20n 32n
 .ta 4n 20n 32n
 typedef void (*evs_deliver_fn_t) (
 typedef void (*evs_deliver_fn_t) (
         struct evs_address source_addr,
         struct evs_address source_addr,
-        void *msg,
-        int msg_len);
+        const void *msg,
+        size_t msg_len);
 
 
 typedef void (*evs_confchg_fn_t) (
 typedef void (*evs_confchg_fn_t) (
-        struct evs_address *member_list, int member_list_entries,
-        struct evs_address *left_list, int left_list_entries,
-        struct evs_address *joined_list, int joined_list_entries);
+        const struct evs_address *member_list, size_t member_list_entries,
+        const struct evs_address *left_list, size_t left_list_entries,
+        const struct evs_address *joined_list, size_t joined_list_entries);
 .ta
 .ta
 .fi
 .fi
 .RE
 .RE