mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
movieplayer: memset() with zero length is useless
Origin commit data
------------------
Commit: 7dac1e7ad9
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-04-27 (Sun, 27 Apr 2014)
This commit is contained in:
committed by
Jacek Jendrzej
parent
70bb20e6aa
commit
2b29cf34ef
@@ -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