From 270e9da193bd830965fdf8355d2d00f2aebb8fc5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 15 Apr 2009 06:52:16 +0000 Subject: [PATCH] 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 --- lib/cpg.c | 2 +- lib/evs.c | 4 ++-- man/cpg_initialize.3 | 20 ++++++++++---------- man/evs_initialize.3 | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/cpg.c b/lib/cpg.c index 5ac35557..0505d8f3 100644 --- a/lib/cpg.c +++ b/lib/cpg.c @@ -501,7 +501,7 @@ cs_error_t cpg_mcast_joined ( struct iovec iov[64]; struct req_lib_cpg_mcast req_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); if (error != CS_OK) { diff --git a/lib/evs.c b/lib/evs.c index 6f968358..eed55aa8 100644 --- a/lib/evs.c +++ b/lib/evs.c @@ -421,7 +421,7 @@ evs_error_t evs_mcast_joined ( struct iovec iov[64]; struct req_lib_evs_mcast_joined req_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); 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 req_lib_evs_mcast_groups req_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); if (error != CS_OK) { diff --git a/man/cpg_initialize.3 b/man/cpg_initialize.3 index 799bad1b..e48c154f 100644 --- a/man/cpg_initialize.3 +++ b/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. .\" * @@ -64,26 +64,26 @@ is called. The callback functions are described by the following type definitio typedef void (*cpg_deliver_fn_t) ( cpg_handle_t handle, - struct cpg_name *group_name, + const struct cpg_name *group_name, uint32_t nodeid, uint32_t pid, - void *msg, - int msg_len); + const void *msg, + size_t msg_len); typedef void (*cpg_confchg_fn_t) ( 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) ( cpg_handle_t handle, uint32_t group_num, 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 .fi diff --git a/man/evs_initialize.3 b/man/evs_initialize.3 index 6045b044..ac75bb48 100644 --- a/man/evs_initialize.3 +++ b/man/evs_initialize.3 @@ -62,13 +62,13 @@ is called. The callback functions are described by the following type definitio .ta 4n 20n 32n typedef void (*evs_deliver_fn_t) ( struct evs_address source_addr, - void *msg, - int msg_len); + const void *msg, + size_t msg_len); 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 .fi .RE