Add cast around malloc

This commit is contained in:
Tim Zakian 2019-01-11 09:49:26 -08:00
parent 416916146f
commit c1610690b1

View File

@ -157,7 +157,7 @@ struct LZ4IO_prefs_s {
LZ4IO_prefs_t* LZ4IO_defaultPreferences(void)
{
LZ4IO_prefs_t* const ret = malloc(sizeof(LZ4IO_prefs_t));
LZ4IO_prefs_t* const ret = (LZ4IO_prefs_t*)malloc(sizeof(LZ4IO_prefs_t));
if (!ret) EXM_THROW(21, "Allocation error : not enough memory");
ret->passThrough = 0;
ret->overwrite = 1;