Browse code

Fixed wrong return type of cipher_kt_mode

The cipher_kt_mode uses bool as return type, this should be int. On
some platforms like OS X, any returned value larger than one will
be converted to 1.

Signed-off-by: Frank de Brabander <brabander@fox-it.com>
Acked-by: Adriaan de Jong <dejong@fox-it.com>
Signed-off-by: David Sommerseth <davids@redhat.com>

Frank de Brabander authored on 2012/02/16 21:51:04
Showing 3 changed files
... ...
@@ -218,7 +218,7 @@ int cipher_kt_block_size (const cipher_kt_t *cipher_kt);
218 218
  * @return 		Cipher mode, either \c OPENVPN_MODE_CBC, \c
219 219
  * 			OPENVPN_MODE_OFB or \c OPENVPN_MODE_CFB
220 220
  */
221
-bool cipher_kt_mode (const cipher_kt_t *cipher_kt);
221
+int cipher_kt_mode (const cipher_kt_t *cipher_kt);
222 222
 
223 223
 
224 224
 /**
... ...
@@ -555,7 +555,7 @@ cipher_kt_block_size (const EVP_CIPHER *cipher_kt)
555 555
   return EVP_CIPHER_block_size (cipher_kt);
556 556
 }
557 557
 
558
-bool
558
+int
559 559
 cipher_kt_mode (const EVP_CIPHER *cipher_kt)
560 560
 {
561 561
   ASSERT(NULL != cipher_kt);
... ...
@@ -313,7 +313,7 @@ cipher_kt_block_size (const cipher_info_t *cipher_kt)
313 313
   return cipher_kt->block_size;
314 314
 }
315 315
 
316
-bool
316
+int
317 317
 cipher_kt_mode (const cipher_info_t *cipher_kt)
318 318
 {
319 319
   ASSERT(NULL != cipher_kt);