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

Fix compile with gcc 2.95.

(Logical change 1.106)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@385 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 21 лет назад
Родитель
Сommit
6250b3fba5
2 измененных файлов с 5 добавлено и 4 удалено
  1. 1 2
      exec/amf.c
  2. 4 2
      exec/gmi.c

+ 1 - 2
exec/amf.c

@@ -1852,8 +1852,7 @@ void amf_confchg_njoin (struct saAmfComponent *component ,void *data)
 
 
 void amf_confchg_nleave (struct saAmfComponent *component ,void *data)
 void amf_confchg_nleave (struct saAmfComponent *component ,void *data)
 {
 {
-	struct in_addr *source_addr;
-	source_addr = (struct in_addr *)data;
+	struct in_addr *source_addr = (struct in_addr *)data;
 	struct saAmfUnit *unit;
 	struct saAmfUnit *unit;
 	struct list_head *list;
 	struct list_head *list;
 	struct saAmfComponent *leave_component = NULL;
 	struct saAmfComponent *leave_component = NULL;

+ 4 - 2
exec/gmi.c

@@ -760,7 +760,6 @@ static void encrypt_and_sign (struct iovec *iovec, int iov_len)
 {
 {
 	char *addr = iov_encrypted.iov_base + sizeof (struct security_header);
 	char *addr = iov_encrypted.iov_base + sizeof (struct security_header);
 	int i;
 	int i;
-	iov_encrypted.iov_len = 0;
 	char keys[48];
 	char keys[48];
 	struct security_header *header = iov_encrypted.iov_base;
 	struct security_header *header = iov_encrypted.iov_base;
 	prng_state keygen_prng_state;
 	prng_state keygen_prng_state;
@@ -770,6 +769,8 @@ static void encrypt_and_sign (struct iovec *iovec, int iov_len)
 	char *initial_vector = &keys[0];
 	char *initial_vector = &keys[0];
 	unsigned long len;
 	unsigned long len;
 
 
+	iov_encrypted.iov_len = 0;
+
 	memset (keys, 0, sizeof (keys));
 	memset (keys, 0, sizeof (keys));
 	memset (header->salt, 0, sizeof (header->salt));
 	memset (header->salt, 0, sizeof (header->salt));
 
 
@@ -848,7 +849,6 @@ print_digest ("hmac_key", hmac_key);
  */
  */
 static int authenticate_and_decrypt (struct iovec *iov)
 static int authenticate_and_decrypt (struct iovec *iov)
 {
 {
-	iov_encrypted.iov_len = 0;
 	char keys[48];
 	char keys[48];
 	struct security_header *header = iov[0].iov_base;
 	struct security_header *header = iov[0].iov_base;
 	prng_state keygen_prng_state;
 	prng_state keygen_prng_state;
@@ -859,6 +859,8 @@ static int authenticate_and_decrypt (struct iovec *iov)
 	char digest_comparison[HMAC_HASH_SIZE];
 	char digest_comparison[HMAC_HASH_SIZE];
 	unsigned long len;
 	unsigned long len;
 
 
+	iov_encrypted.iov_len = 0;
+
 #if (defined(ENCRYPTION) || defined(AUTHENITCATION))
 #if (defined(ENCRYPTION) || defined(AUTHENITCATION))
 	/*
 	/*
 	 * Generate MAC, CIPHER, IV keys from private key
 	 * Generate MAC, CIPHER, IV keys from private key