diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
commit | 61f5b6f33807306d09bccbc2dcad474d1d04ca40 (patch) | |
tree | 1680fa648df5f730df11ec433a512a1fadf0facd /crypto/des/enc_read.c | |
parent | 779cc0bca98e35830db455f34b986b86a2d2f822 (diff) |
Work with -pedantic!
Diffstat (limited to 'crypto/des/enc_read.c')
-rw-r--r-- | crypto/des/enc_read.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/des/enc_read.c b/crypto/des/enc_read.c index 23768daeef..5e256d03c2 100644 --- a/crypto/des/enc_read.c +++ b/crypto/des/enc_read.c @@ -84,8 +84,8 @@ int des_rw_mode=DES_PCBC_MODE; */ -int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, - des_cblock iv) +int des_enc_read(int fd, void *buf, int len, des_key_schedule sched, + des_cblock iv) { /* data to be unencrypted */ int net_num=0; @@ -125,7 +125,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, * with the number of bytes we have - should always * check the return value */ memcpy(buf,&(unnet[unnet_start]), - (unsigned int)unnet_left); + unnet_left); /* eay 26/08/92 I had the next 2 lines * reversed :-( */ i=unnet_left; @@ -133,7 +133,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, } else { - memcpy(buf,&(unnet[unnet_start]),(unsigned int)len); + memcpy(buf,&(unnet[unnet_start]),len); unnet_start+=len; unnet_left-=len; i=len; @@ -184,9 +184,9 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, des_pcbc_encrypt(net,unnet,num,sched,iv,DES_DECRYPT); else des_cbc_encrypt(net,unnet,num,sched,iv,DES_DECRYPT); - memcpy(buf,unnet,(unsigned int)len); + memcpy(buf,unnet,len); unnet_start=len; - unnet_left=(int)num-len; + unnet_left=num-len; /* The following line is done because we return num * as the number of bytes read. */ @@ -211,7 +211,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, /* eay 26/08/92 fix a bug that returned more * bytes than you asked for (returned len bytes :-( */ - memcpy(buf,tmpbuf,(unsigned int)num); + memcpy(buf,tmpbuf,num); } else { @@ -223,6 +223,6 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, DES_DECRYPT); } } - return((int)num); + return num; } |