Merge malloc+memset -> calloc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29929 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-11-17 19:14:42 +00:00
parent 450d40d443
commit a81e043f98
1 changed files with 2 additions and 4 deletions

View File

@ -396,8 +396,7 @@ stream_t* new_memory_stream(unsigned char* data,int len){
if(len < 0)
return NULL;
s=malloc(sizeof(stream_t)+len);
memset(s,0,sizeof(stream_t));
s=calloc(1, sizeof(stream_t)+len);
s->fd=-1;
s->type=STREAMTYPE_MEMORY;
s->buf_pos=0; s->buf_len=len;
@ -409,9 +408,8 @@ stream_t* new_memory_stream(unsigned char* data,int len){
}
stream_t* new_stream(int fd,int type){
stream_t *s=malloc(sizeof(stream_t));
stream_t *s=calloc(1, sizeof(stream_t));
if(s==NULL) return NULL;
memset(s,0,sizeof(stream_t));
#if HAVE_WINSOCK2_H
{