Mercurial > mplayer.hg
changeset 23806:0a38ad149c5c
Remove some more useless *alloc casts
author | reimar |
---|---|
date | Thu, 19 Jul 2007 13:52:39 +0000 |
parents | 3c6db57870ea |
children | f4f7dd84188b |
files | codec-cfg.c get_path.c m_config.c parser-cfg.c |
diffstat | 4 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/codec-cfg.c Thu Jul 19 07:24:43 2007 +0000 +++ b/codec-cfg.c Thu Jul 19 13:52:39 2007 +0000 @@ -378,7 +378,7 @@ pos = strlen(*d); (*d)[pos++] = '\n'; } - if (!(*d = (char *) realloc(*d, pos + strlen(s) + 1))) { + if (!(*d = realloc(*d, pos + strlen(s) + 1))) { mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantAllocateComment); return 0; } @@ -519,7 +519,7 @@ return 0; } - if ((line = (char *) malloc(MAX_LINE_LEN + 1)) == NULL) { + if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) { mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantGetMemoryForLine, strerror(errno)); return 0; } @@ -576,7 +576,7 @@ goto err_out; #endif } - if (!(*codecsp = (codecs_t *) realloc(*codecsp, + if (!(*codecsp = realloc(*codecsp, sizeof(codecs_t) * (*nr_codecsp + 2)))) { mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantReallocCodecsp, strerror(errno)); goto err_out;
--- a/get_path.c Thu Jul 19 07:24:43 2007 +0000 +++ b/get_path.c Thu Jul 19 13:52:39 2007 +0000 @@ -53,12 +53,12 @@ #endif len = strlen(homedir) + strlen(config_dir) + 1; if (filename == NULL) { - if ((buff = (char *) malloc(len)) == NULL) + if ((buff = malloc(len)) == NULL) return NULL; sprintf(buff, "%s%s", homedir, config_dir); } else { len += strlen(filename) + 1; - if ((buff = (char *) malloc(len)) == NULL) + if ((buff = malloc(len)) == NULL) return NULL; sprintf(buff, "%s%s/%s", homedir, config_dir, filename); } @@ -95,7 +95,7 @@ maxlen=strlen(filename)+strlen(res_url_path)+2; } free(buff); - buff = (char *) malloc(maxlen); + buff = malloc(maxlen); strcpy(buff, res_url_path); strcat(buff,"/");
--- a/m_config.c Thu Jul 19 07:24:43 2007 +0000 +++ b/m_config.c Thu Jul 19 13:52:39 2007 +0000 @@ -199,7 +199,7 @@ // Fill in the full name if(prefix && strlen(prefix) > 0) { int l = strlen(prefix) + 1 + strlen(arg->name) + 1; - co->name = (char*) malloc(l); + co->name = malloc(l); sprintf(co->name,"%s:%s",prefix,arg->name); } else co->name = arg->name;
--- a/parser-cfg.c Thu Jul 19 07:24:43 2007 +0000 +++ b/parser-cfg.c Thu Jul 19 13:52:39 2007 +0000 @@ -69,7 +69,7 @@ config->mode = M_CONFIG_FILE; - if ((line = (char *) malloc(MAX_LINE_LEN + 1)) == NULL) { + if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) { mp_msg(MSGT_CFGPARSER,MSGL_FATAL,"\ncan't get memory for 'line': %s", strerror(errno)); ret = -1; goto out;