Просмотр исходного кода

totem.h: use symbolic array dimensions in public struct members

* include/corosync/totem/totem.h:
(TOTEM_PRIVATE_KEY_LEN, TOTEM_RRP_MODE_BYTES): Define.
(struct totem_config): Use the new names, rather than literals.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2037 fd59a12c-fef9-0310-b244-a6a79926bd2f
Jim Meyering 17 лет назад
Родитель
Сommit
fdf9b231f6
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      include/corosync/totem/totem.h

+ 5 - 2
include/corosync/totem/totem.h

@@ -75,6 +75,9 @@ struct totem_logging_configuration {
 	int log_subsys_id;
 };
 
+enum { TOTEM_PRIVATE_KEY_LEN = 128 };
+enum { TOTEM_RRP_MODE_BYTES = 64 };
+
 struct totem_config {
 	int version;
 
@@ -88,7 +91,7 @@ struct totem_config {
 	/*
 	 * key information
 	 */
-	unsigned char private_key[128];
+	unsigned char private_key[TOTEM_PRIVATE_KEY_LEN];
 
 	unsigned int private_key_len;
 
@@ -123,7 +126,7 @@ struct totem_config {
 
 	unsigned int rrp_problem_count_threshold;
 
-	char rrp_mode[64];
+	char rrp_mode[TOTEM_RRP_MODE_BYTES];
 
 	struct totem_logging_configuration totem_logging_configuration;