openbsd-ports/x11/olvwm/patches/patch-mem_c

49 lines
1.2 KiB
Plaintext
Raw Normal View History

2004-01-28 15:58:53 -05:00
$OpenBSD: patch-mem_c,v 1.1 2004/01/28 20:58:54 naddy Exp $
--- mem.c.orig 1994-01-13 22:36:08.000000000 +0100
+++ mem.c 2004-01-28 21:49:10.000000000 +0100
@@ -18,7 +18,7 @@
#include <sys/types.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <memory.h>
#include <stdio.h>
2004-01-28 15:58:53 -05:00
@@ -139,7 +139,7 @@ MemAllocN(sz
{
void *p;
- if ((p = malloc(sz)) == NULL)
+ if ((p = (int *)malloc(sz)) == NULL)
ErrorGeneral(gettext("Memory allocation failure."));
#ifdef MEMDEBUG
2004-01-28 15:58:53 -05:00
@@ -164,7 +164,7 @@ MemAlloc(sz
{
void *p;
- if ((p = malloc(sz)) == NULL)
+ if ((p = (int *)malloc(sz)) == NULL)
ErrorGeneral(GetString("Memory allocation failure."));
memset((char *) p, 0, (int) sz);
2004-01-28 15:58:53 -05:00
@@ -191,7 +191,7 @@ MemCalloc(num, sz
{
void *p;
- if ((p = calloc(num, sz)) == NULL)
+ if ((p = (int *)calloc(num, sz)) == NULL)
ErrorGeneral(GetString("Memory array allocation failure."));
memset((char *) p, 0, (int) sz * (int) num);
2004-01-28 15:58:53 -05:00
@@ -210,7 +210,7 @@ MemRealloc(p, sz)
{
void *t;
- if ((t = realloc(p, sz)) == NULL)
+ if ((t = (int *)realloc(p, sz)) == NULL)
ErrorGeneral(GetString("Memory array allocation failure."));
#ifdef MEMDEBUG