]> git.proxmox.com Git - mirror_corosync-qdevice.git/commitdiff
qdevice-cmap: Fix clear high node bit typo
authorJan Friesse <jfriesse@redhat.com>
Thu, 12 Nov 2020 15:53:50 +0000 (16:53 +0100)
committerJan Friesse <jfriesse@redhat.com>
Fri, 13 Nov 2020 15:01:23 +0000 (16:01 +0100)
It's really bit, not byte.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
qdevices/qdevice-cmap.c

index 6a9ba5d96c831b28233cc75a58eb9a298e855e78..c2fff047d9f67eb5f1b3c33a0e2c5530abc246f2 100644 (file)
@@ -50,7 +50,7 @@
 #include "utils.h"
 
 static uint32_t
-qdevice_cmap_autogenerate_node_id(const char *addr, int clear_node_high_byte)
+qdevice_cmap_autogenerate_node_id(const char *addr, int clear_node_high_bit)
 {
        struct addrinfo *ainfo;
        struct addrinfo ahints;
@@ -80,7 +80,7 @@ qdevice_cmap_autogenerate_node_id(const char *addr, int clear_node_high_byte)
 
        ret = htonl(i);
 
-       if (clear_node_high_byte) {
+       if (clear_node_high_bit) {
                ret &= 0x7FFFFFFF;
        }
 
@@ -101,7 +101,7 @@ qdevice_cmap_get_nodelist(cmap_handle_t cmap_handle, struct node_list *list)
        uint32_t data_center_id;
        char *tmp_str;
        char *addr0_str;
-       int clear_node_high_byte;
+       int clear_node_high_bit;
 
        ret_value = 0;
 
@@ -129,12 +129,12 @@ qdevice_cmap_get_nodelist(cmap_handle_t cmap_handle, struct node_list *list)
                        /*
                         * Nodeid doesn't exists -> autogenerate node id
                         */
-                       clear_node_high_byte = 0;
+                       clear_node_high_bit = 0;
 
                        if (cmap_get_string(cmap_handle, "totem.clear_node_high_bit",
                            &tmp_str) == CS_OK) {
                                if (strcmp (tmp_str, "yes") == 0) {
-                                       clear_node_high_byte = 1;
+                                       clear_node_high_bit = 1;
                                }
 
                                free(tmp_str);
@@ -145,7 +145,7 @@ qdevice_cmap_get_nodelist(cmap_handle_t cmap_handle, struct node_list *list)
                        }
 
                        node_id = qdevice_cmap_autogenerate_node_id(addr0_str,
-                           clear_node_high_byte);
+                           clear_node_high_bit);
 
                        free(addr0_str);
                } else if (cs_err != CS_OK) {