From 1eabb733c6214abb6ee6fbe6bb56cfc6e46eaef7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 8 Apr 2009 17:29:45 +0000 Subject: [PATCH] cpg.h, coroapi.h: more size_t and const changes * include/corosync/cpg.h (cpg_deliver_fn_t, cpg_confchg_fn_t) (cpg_groups_get_fn_t): * include/corosync/engine/coroapi.h (ipc_response_send) (ipc_dispatch_send, tpg_join, tpg_leave, tpg_groups_mcast) (tpg_groups_reserve): git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2043 fd59a12c-fef9-0310-b244-a6a79926bd2f --- include/corosync/cpg.h | 16 ++++++++-------- include/corosync/engine/coroapi.h | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/corosync/cpg.h b/include/corosync/cpg.h index 5403eaa7..49299ffd 100644 --- a/include/corosync/cpg.h +++ b/include/corosync/cpg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2008 Red Hat, Inc. + * Copyright (c) 2006-2009 Red Hat, Inc. * * All rights reserved. * @@ -84,22 +84,22 @@ typedef void (*cpg_deliver_fn_t) ( 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_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, + const struct cpg_address *member_list, size_t member_list_entries); typedef struct { cpg_deliver_fn_t cpg_deliver_fn; diff --git a/include/corosync/engine/coroapi.h b/include/corosync/engine/coroapi.h index 0c05e491..d143ee1d 100644 --- a/include/corosync/engine/coroapi.h +++ b/include/corosync/engine/coroapi.h @@ -392,12 +392,12 @@ struct corosync_api_v1 { void *(*ipc_private_data_get) (void *conn); - int (*ipc_response_send) (void *conn, const void *msg, int mlen); + int (*ipc_response_send) (void *conn, const void *msg, size_t mlen); int (*ipc_response_iov_send) (void *conn, const struct iovec *iov, unsigned int iov_len); - int (*ipc_dispatch_send) (void *conn, const void *msg, int mlen); + int (*ipc_dispatch_send) (void *conn, const void *msg, size_t mlen); int (*ipc_dispatch_iov_send) (void *conn, const struct iovec *iov, unsigned int iov_len); @@ -465,12 +465,12 @@ struct corosync_api_v1 { int (*tpg_join) ( hdb_handle_t handle, struct corosync_tpg_group *groups, - int group_cnt); + size_t group_cnt); int (*tpg_leave) ( hdb_handle_t handle, struct corosync_tpg_group *groups, - int group_cnt); + size_t group_cnt); int (*tpg_joined_mcast) ( hdb_handle_t handle, @@ -490,14 +490,14 @@ struct corosync_api_v1 { hdb_handle_t handle, int guarantee, const struct corosync_tpg_group *groups, - int groups_cnt, + size_t groups_cnt, const struct iovec *iovec, unsigned int iov_len); int (*tpg_groups_reserve) ( hdb_handle_t handle, const struct corosync_tpg_group *groups, - int groups_cnt, + size_t groups_cnt, const struct iovec *iovec, unsigned int iov_len);