提交 446dffa7 编写于 作者: R Rich Salz

GH1383: Add casts to ERR_PACK

Reviewed-by: NEmilia Käsper <emilia@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1385
上级 2f35e6a3
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册