Package: corosync / 2.4.2-3+deb9u1

Fix-typo-prefered-preferred.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Mon, 29 Aug 2016 21:29:08 +0200
Subject: Fix typo: prefered -> preferred

---
 man/corosync-qdevice.8        |  2 +-
 qdevices/qnetd-algo-ffsplit.c | 26 +++++++++++++-------------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/man/corosync-qdevice.8 b/man/corosync-qdevice.8
index fbeb328..338806e 100644
--- a/man/corosync-qdevice.8
+++ b/man/corosync-qdevice.8
@@ -156,7 +156,7 @@ can be one of
 .I 0|4|6
 and forces the software to use the given IP version.
 .I 0
-(default value) means IPv6 is prefered and IPv4 should be used as a fallback.
+(default value) means IPv6 is preferred and IPv4 should be used as a fallback.
 
 .PP
 Logging configuration is within the
diff --git a/qdevices/qnetd-algo-ffsplit.c b/qdevices/qnetd-algo-ffsplit.c
index 01e5f0c..356bdbf 100644
--- a/qdevices/qnetd-algo-ffsplit.c
+++ b/qdevices/qnetd-algo-ffsplit.c
@@ -102,25 +102,25 @@ qnetd_algo_ffsplit_client_init(struct qnetd_client *client)
 }
 
 static int
-qnetd_algo_ffsplit_is_prefered_partition(const struct qnetd_client *client,
+qnetd_algo_ffsplit_is_preferred_partition(const struct qnetd_client *client,
     const struct node_list *config_node_list, const struct node_list *membership_node_list)
 {
-	uint32_t prefered_node_id;
+	uint32_t preferred_node_id;
 	struct node_list_entry *node_entry;
 	int case_processed;
 
-	prefered_node_id = 0;
+	preferred_node_id = 0;
 	case_processed = 0;
 
 	switch (client->tie_breaker.mode) {
 	case TLV_TIE_BREAKER_MODE_LOWEST:
 		node_entry = TAILQ_FIRST(config_node_list);
 
-		prefered_node_id = node_entry->node_id;
+		preferred_node_id = node_entry->node_id;
 
 		TAILQ_FOREACH(node_entry, config_node_list, entries) {
-			if (node_entry->node_id < prefered_node_id) {
-				prefered_node_id = node_entry->node_id;
+			if (node_entry->node_id < preferred_node_id) {
+				preferred_node_id = node_entry->node_id;
 			}
 		}
 		case_processed = 1;
@@ -128,28 +128,28 @@ qnetd_algo_ffsplit_is_prefered_partition(const struct qnetd_client *client,
 	case TLV_TIE_BREAKER_MODE_HIGHEST:
 		node_entry = TAILQ_FIRST(config_node_list);
 
-		prefered_node_id = node_entry->node_id;
+		preferred_node_id = node_entry->node_id;
 
 		TAILQ_FOREACH(node_entry, config_node_list, entries) {
-			if (node_entry->node_id > prefered_node_id) {
-				prefered_node_id = node_entry->node_id;
+			if (node_entry->node_id > preferred_node_id) {
+				preferred_node_id = node_entry->node_id;
 			}
 		}
 		case_processed = 1;
 		break;
 	case TLV_TIE_BREAKER_MODE_NODE_ID:
-		prefered_node_id = client->tie_breaker.node_id;
+		preferred_node_id = client->tie_breaker.node_id;
 		case_processed = 1;
 		break;
 	}
 
 	if (!case_processed) {
-		qnetd_log(LOG_CRIT, "qnetd_algo_ffsplit_is_prefered_partition unprocessed "
+		qnetd_log(LOG_CRIT, "qnetd_algo_ffsplit_is_preferred_partition unprocessed "
 		    "tie_breaker.mode");
 		exit(1);
 	}
 
-	return (node_list_find_node_id(membership_node_list, prefered_node_id) != NULL);
+	return (node_list_find_node_id(membership_node_list, preferred_node_id) != NULL);
 }
 
 static int
@@ -366,7 +366,7 @@ qnetd_algo_ffsplit_partition_cmp(const struct qnetd_client *client1,
 		 * Number of active clients in both partitions equals. Use tie-breaker.
 		 */
 
-		if (qnetd_algo_ffsplit_is_prefered_partition(client1, config_node_list1,
+		if (qnetd_algo_ffsplit_is_preferred_partition(client1, config_node_list1,
 		    membership_node_list1)) {
 			res = 1; goto exit_res;
 		} else {