mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
movieplayer: memset() with zero length is useless
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7dac1e7ad9
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-04-27 (Sun, 27 Apr 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Jacek Jendrzej
parent
b4a9c91f2b
commit
104bcad13a
@@ -1461,12 +1461,11 @@ bool CMoviePlayerGui::convertSubtitle(std::string &text)
|
|||||||
size_t ilen = text.length();
|
size_t ilen = text.length();
|
||||||
size_t olen = ilen*4;
|
size_t olen = ilen*4;
|
||||||
size_t len = olen;
|
size_t len = olen;
|
||||||
char * buf = (char *) malloc(olen+1);
|
char * buf = (char *) calloc(olen + 1, 1);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
iconv_close(cd);
|
iconv_close(cd);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
memset(buf, olen+1, 0);
|
|
||||||
char * out = buf;
|
char * out = buf;
|
||||||
char * in = (char *) text.c_str();
|
char * in = (char *) text.c_str();
|
||||||
if (iconv(cd, &in, &ilen, &out, &olen) == (size_t)-1) {
|
if (iconv(cd, &in, &ilen, &out, &olen) == (size_t)-1) {
|
||||||
|
Reference in New Issue
Block a user