]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
use explicit casts to unsigned int in the CURVE_TO_BITS et al
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 18 Feb 2015 22:04:24 +0000 (23:04 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 18 Feb 2015 22:04:24 +0000 (23:04 +0100)
lib/includes/gnutls/gnutls.h.in

index e3c5319537b4ea3cf6120f5ae97fde7b880dd1a2..2141eddc332ed47d8d0342626b46bfe634c6ac55 100644 (file)
@@ -711,9 +711,9 @@ typedef enum {
 
 /* macros to allow specifying a specific curve in gnutls_privkey_generate()
  * and gnutls_x509_privkey_generate() */
-#define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)((1<<31)|(curve))
-#define GNUTLS_BITS_TO_CURVE(bits) ((bits) & 0x7FFFFFFF)
-#define GNUTLS_BITS_ARE_CURVE(bits) ((bits) & 0x80000000)
+#define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)((1<<31)|((unsigned int)(curve)))
+#define GNUTLS_BITS_TO_CURVE(bits) (((unsigned int)(bits)) & 0x7FFFFFFF)
+#define GNUTLS_BITS_ARE_CURVE(bits) (((unsigned int)(bits)) & 0x80000000)
 
 /**
  * gnutls_sec_param_t: