diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-26 15:01:37 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-26 15:01:37 +0000 |
commit | b63759b175cf9ddd9735ca0d2f803fe62f69c3c3 (patch) | |
tree | a583febda46545afc4ed20ccbdbed0ae3165a5c4 /stream/http.c | |
parent | fad137d7fe3bfef6a258518a1e86a4d811d3b4b5 (diff) | |
download | mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.bz2 mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.xz |
Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/http.c')
-rw-r--r-- | stream/http.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/http.c b/stream/http.c index bda6c060c7..d79f7632ca 100644 --- a/stream/http.c +++ b/stream/http.c @@ -332,7 +332,7 @@ http_response_append( HTTP_header_t *http_hdr, char *response, int length ) { mp_msg(MSGT_NETWORK,MSGL_FATAL,"Bad size in memory (re)allocation\n"); return -1; } - http_hdr->buffer = (char*)realloc( http_hdr->buffer, http_hdr->buffer_size+length+1 ); + http_hdr->buffer = realloc( http_hdr->buffer, http_hdr->buffer_size+length+1 ); if( http_hdr->buffer==NULL ) { mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory (re)allocation failed\n"); return -1; @@ -428,7 +428,7 @@ http_response_parse( HTTP_header_t *http_hdr ) { while( *ptr!='\r' && *ptr!='\n' ) ptr++; len = ptr-hdr_ptr; if( len==0 ) break; - field = (char*)realloc(field, len+1); + field = realloc(field, len+1); if( field==NULL ) { mp_msg(MSGT_NETWORK,MSGL_ERR,"Memory allocation failed\n"); return -1; @@ -520,7 +520,7 @@ char * http_get_field( HTTP_header_t *http_hdr, const char *field_name ) { if( http_hdr==NULL || field_name==NULL ) return NULL; http_hdr->field_search_pos = http_hdr->first_field; - http_hdr->field_search = (char*)realloc( http_hdr->field_search, strlen(field_name)+1 ); + http_hdr->field_search = realloc( http_hdr->field_search, strlen(field_name)+1 ); if( http_hdr->field_search==NULL ) { mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed\n"); return NULL; |