提交 5a88a6ea 编写于 作者: B Ben Laurie

Rid the world of more evil casts.

上级 215c24fc
......@@ -200,9 +200,9 @@ typedef struct crypto_ex_data_func_st
#define Remalloc(addr,num) \
CRYPTO_dbg_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
#define FreeFunc CRYPTO_dbg_free
#define Free(addr) CRYPTO_dbg_free((char *)(addr))
#define Free(addr) CRYPTO_dbg_free(addr)
#define Malloc_locked(num) CRYPTO_malloc_locked((int)num)
#define Free_locked(addr) CRYPTO_free_locked((char *)(addr))
#define Free_locked(addr) CRYPTO_free_locked(addr)
#else
#define MemCheck_start()
#define MemCheck_stop()
......@@ -211,18 +211,18 @@ typedef struct crypto_ex_data_func_st
#define Remalloc CRYPTO_remalloc
#if defined(WIN32) || defined(MFUNC)
#define Malloc CRYPTO_malloc
#define Realloc(a,n) CRYPTO_realloc((char *)(a),(n))
#define Realloc(a,n) CRYPTO_realloc(a,(n))
#define FreeFunc CRYPTO_free
#define Free(addr) CRYPTO_free((char *)(addr))
#define Free(addr) CRYPTO_free(addr)
#define Malloc_locked CRYPTO_malloc_locked
#define Free_locked(addr) CRYPTO_free_locked((char *)(addr))
#define Free_locked(addr) CRYPTO_free_locked(addr)
#else
#define Malloc malloc
#define Realloc realloc
#define FreeFunc free
#define Free(addr) free((char *)(addr))
#define Free(addr) free(addr)
#define Malloc_locked malloc
#define Free_locked(addr) free((char *)(addr))
#define Free_locked(addr) free(addr)
#endif /* WIN32 || MFUNC */
#endif /* MDEBUG */
......@@ -266,17 +266,17 @@ void CRYPTO_get_mem_functions(char *(**m)(),char *(**r)(), void (**f)());
void CRYPTO_set_locked_mem_functions(char *(*m)(), void (*free_func)());
void CRYPTO_get_locked_mem_functions(char *(**m)(), void (**f)());
char *CRYPTO_malloc_locked(int num);
void CRYPTO_free_locked(char *);
char *CRYPTO_malloc(int num);
void CRYPTO_free(char *);
char *CRYPTO_realloc(char *addr,int num);
char *CRYPTO_remalloc(char *addr,int num);
char *CRYPTO_dbg_malloc(int num,char *file,int line);
char *CRYPTO_dbg_realloc(char *addr,int num,char *file,int line);
void CRYPTO_dbg_free(char *);
char *CRYPTO_dbg_remalloc(char *addr,int num,char *file,int line);
void *CRYPTO_malloc_locked(int num);
void CRYPTO_free_locked(void *);
void *CRYPTO_malloc(int num);
void CRYPTO_free(void *);
void *CRYPTO_realloc(void *addr,int num);
void *CRYPTO_remalloc(void *addr,int num);
void *CRYPTO_dbg_malloc(int num,char *file,int line);
void *CRYPTO_dbg_realloc(void *addr,int num,char *file,int line);
void CRYPTO_dbg_free(void *);
void *CRYPTO_dbg_remalloc(void *addr,int num,char *file,int line);
#ifndef NO_FP_API
void CRYPTO_mem_leaks_fp(FILE *);
#endif
......@@ -313,13 +313,13 @@ int CRYPTO_add_lock();
void CRYPTO_set_mem_functions();
void CRYPTO_get_mem_functions();
char *CRYPTO_malloc();
char *CRYPTO_realloc();
void *CRYPTO_malloc();
void *CRYPTO_realloc();
void CRYPTO_free();
char *CRYPTO_remalloc();
char *CRYPTO_dbg_remalloc();
char *CRYPTO_dbg_malloc();
char *CRYPTO_dbg_realloc();
void *CRYPTO_remalloc();
void *CRYPTO_dbg_remalloc();
void *CRYPTO_dbg_malloc();
void *CRYPTO_dbg_realloc();
void CRYPTO_dbg_free();
#ifndef NO_FP_API
void CRYPTO_mem_leaks_fp();
......
......@@ -172,39 +172,39 @@ void (**f)();
if (f != NULL) *f=free_locked_func;
}
char *CRYPTO_malloc_locked(num)
void *CRYPTO_malloc_locked(num)
int num;
{
return(malloc_locked_func(num));
}
void CRYPTO_free_locked(str)
char *str;
void *str;
{
free_locked_func(str);
}
char *CRYPTO_malloc(num)
void *CRYPTO_malloc(num)
int num;
{
return(malloc_func(num));
}
char *CRYPTO_realloc(str,num)
char *str;
void *CRYPTO_realloc(str,num)
void *str;
int num;
{
return(realloc_func(str,num));
}
void CRYPTO_free(str)
char *str;
void *str;
{
free_func(str);
}
static unsigned long break_order_num=0;
char *CRYPTO_dbg_malloc(num,file,line)
void *CRYPTO_dbg_malloc(num,file,line)
int num;
char *file;
int line;
......@@ -259,7 +259,7 @@ err:
}
void CRYPTO_dbg_free(addr)
char *addr;
void *addr;
{
MEM m,*mp;
......@@ -277,8 +277,8 @@ char *addr;
free_func(addr);
}
char *CRYPTO_dbg_realloc(addr,num,file,line)
char *addr;
void *CRYPTO_dbg_realloc(addr,num,file,line)
void *addr;
int num;
char *file;
int line;
......@@ -307,8 +307,8 @@ int line;
return(ret);
}
char *CRYPTO_remalloc(a,n)
char *a;
void *CRYPTO_remalloc(a,n)
void *a;
int n;
{
if (a != NULL) Free(a);
......@@ -316,8 +316,8 @@ int n;
return(a);
}
char *CRYPTO_dbg_remalloc(a,n,file,line)
char *a;
void *CRYPTO_dbg_remalloc(a,n,file,line)
void *a;
int n;
char *file;
int line;
......
......@@ -752,8 +752,8 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
&(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */
&(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */
&(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */
&(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666.1 */
&(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666.2 */
&(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666.1 */
&(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */
&(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */
&(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册