[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Wed Aug 10 13:51:33 UTC 2016


The branch master has been updated
       via  446dffa7f6abf5400adac9c7814440b5af3b7edd (commit)
      from  2f35e6a3eb327b9ada5da06fb914df566da81f94 (commit)


- Log -----------------------------------------------------------------
commit 446dffa7f6abf5400adac9c7814440b5af3b7edd
Author: Rich Salz <rsalz at openssl.org>
Date:   Wed Aug 10 09:45:36 2016 -0400

    GH1383: Add casts to ERR_PACK
    
    Reviewed-by: Emilia Käsper <emilia at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1385

-----------------------------------------------------------------------

Summary of changes:
 include/openssl/err.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/openssl/err.h b/include/openssl/err.h
index fdffd66..f939091 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -133,11 +133,13 @@ typedef struct err_state_st {
 # define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
 # define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)
 
-# define ERR_PACK(l,f,r) \
-  ( ((unsigned int)((l) & 0x0FF) << 24L) | (((f) & 0xFFF) << 12L) | ((r) & 0xFFF) )
-# define ERR_GET_LIB(l)          (int)((((unsigned long)l)>>24L)&0xffL)
-# define ERR_GET_FUNC(l)         (int)((((unsigned long)l)>>12L)&0xfffL)
-# define ERR_GET_REASON(l)       (int)((l)&0xfffL)
+# define ERR_PACK(l,f,r) ( \
+        (((unsigned int)(l) & 0x0FF) << 24L) | \
+        (((unsigned int)(f) & 0xFFF) << 12L) | \
+        (((unsigned int)(r) & 0xFFF)       ) )
+# define ERR_GET_LIB(l)          (int)(((l) >> 24L) & 0x0FFL)
+# define ERR_GET_FUNC(l)         (int)(((l) >> 12L) & 0xFFFL)
+# define ERR_GET_REASON(l)       (int)( (l)         & 0xFFFL)
 
 /* OS functions */
 # define SYS_F_FOPEN             1


More information about the openssl-commits mailing list