1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

fix register_iconv

* not sure but this looked completely wrong, as 'iconv'
  is a function.
* if iconv_cd is NULL, iconv_count is 0 and therefore
  realloc should do the same as malloc here.


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1069 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Phil 2008-03-29 07:24:25 +00:00
parent 2913a71216
commit a16a96911a

View File

@ -387,11 +387,7 @@ static iconv_t **iconv_cd = 0;
int register_iconv(iconv_t *new_iconv)
{
if (iconv_cd) {
iconv_cd = realloc(iconv, sizeof(iconv_t *) * (iconv_count + 1));
} else {
iconv_cd = malloc(sizeof(iconv_t *));
}
iconv_cd = realloc(iconv_cd, sizeof(iconv_t *) * (iconv_count + 1));
if (!iconv_cd) {
CRIT_ERR("Out of memory");
}