Explorar el Código

cfg: nodeid should be unsigned int

nodeid in struct req_lib_cfg_get_node_addrs is "unsigned int",
so the function corosync_cfg_get_node_addrs should have its param
"nodeid" to be unsigned int.

Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit 250750b8296d59a3b50b399da7193e8dea93f8e7)
Bin Liu hace 8 años
padre
commit
71d078ea0b
Se han modificado 5 ficheros con 5 adiciones y 5 borrados
  1. 1 1
      include/corosync/cfg.h
  2. 1 1
      include/corosync/ipc_cfg.h
  3. 1 1
      lib/cfg.c
  4. 1 1
      tools/corosync-cfgtool.c
  5. 1 1
      tools/corosync-cpgtool.c

+ 1 - 1
include/corosync/cfg.h

@@ -218,7 +218,7 @@ corosync_cfg_replyto_shutdown (
 cs_error_t
 corosync_cfg_get_node_addrs (
 	corosync_cfg_handle_t cfg_handle,
-	int nodeid,
+	unsigned int nodeid,
 	size_t max_addrs,
 	int *num_addrs,
 	corosync_cfg_node_address_t *addrs);

+ 1 - 1
include/corosync/ipc_cfg.h

@@ -173,7 +173,7 @@ struct res_lib_cfg_testshutdown {
  * @brief The req_lib_cfg_get_node_addrs struct
  */
 struct req_lib_cfg_get_node_addrs {
-        struct qb_ipc_request_header header __attribute__((aligned(8)));
+	struct qb_ipc_request_header header __attribute__((aligned(8)));
 	unsigned int nodeid;
 };
 

+ 1 - 1
lib/cfg.c

@@ -512,7 +512,7 @@ corosync_cfg_replyto_shutdown (
 
 cs_error_t corosync_cfg_get_node_addrs (
 	corosync_cfg_handle_t cfg_handle,
-	int nodeid,
+	unsigned int nodeid,
 	size_t max_addrs,
 	int *num_addrs,
 	corosync_cfg_node_address_t *addrs)

+ 1 - 1
tools/corosync-cfgtool.c

@@ -197,7 +197,7 @@ static void shutdown_do(void)
 	(void)corosync_cfg_finalize (handle);
 }
 
-static void showaddrs_do(int nodeid)
+static void showaddrs_do(unsigned int nodeid)
 {
 	cs_error_t result;
 	corosync_cfg_handle_t handle;

+ 1 - 1
tools/corosync-cpgtool.c

@@ -61,7 +61,7 @@ typedef enum {
 	OPER_FULL_OUTPUT = 2,
 } operation_t;
 
-static void fprint_addrs(FILE *f, int nodeid)
+static void fprint_addrs(FILE *f, unsigned int nodeid)
 {
 	int numaddrs;
 	int i;