mirror of https://git.kore.io/kore.git
remove cast for malloc + add missing stdlib.h
This commit is contained in:
parent
9c7aaf179f
commit
51c8188f7a
|
@ -14,6 +14,8 @@
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "kore.h"
|
#include "kore.h"
|
||||||
|
|
||||||
#define KORE_MEM_MAGIC 0xd0d0
|
#define KORE_MEM_MAGIC 0xd0d0
|
||||||
|
@ -46,7 +48,7 @@ kore_malloc(size_t len)
|
||||||
struct meminfo *mem;
|
struct meminfo *mem;
|
||||||
|
|
||||||
mlen = sizeof(struct meminfo) + len;
|
mlen = sizeof(struct meminfo) + len;
|
||||||
if ((mem = (struct meminfo *)malloc(mlen)) == NULL)
|
if ((mem = malloc(mlen)) == NULL)
|
||||||
fatal("kore_malloc(%d): %d", len, errno);
|
fatal("kore_malloc(%d): %d", len, errno);
|
||||||
|
|
||||||
mem->clen = len;
|
mem->clen = len;
|
||||||
|
|
Loading…
Reference in New Issue