mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
movieplayer: memset() with zero length is useless
This commit is contained in:
committed by
Jacek Jendrzej
parent
61dc01f719
commit
7dac1e7ad9
@@ -1461,12 +1461,11 @@ bool CMoviePlayerGui::convertSubtitle(std::string &text)
|
||||
size_t ilen = text.length();
|
||||
size_t olen = ilen*4;
|
||||
size_t len = olen;
|
||||
char * buf = (char *) malloc(olen+1);
|
||||
char * buf = (char *) calloc(olen + 1, 1);
|
||||
if (buf == NULL) {
|
||||
iconv_close(cd);
|
||||
return ret;
|
||||
}
|
||||
memset(buf, olen+1, 0);
|
||||
char * out = buf;
|
||||
char * in = (char *) text.c_str();
|
||||
if (iconv(cd, &in, &ilen, &out, &olen) == (size_t)-1) {
|
||||
|
Reference in New Issue
Block a user