mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
27 lines
762 B
Plaintext
27 lines
762 B
Plaintext
|
--- Xwnmo/xwnmo/localalloc.c.~1~ Tue Dec 1 15:10:40 1992
|
||
|
+++ Xwnmo/xwnmo/localalloc.c Thu Jun 25 12:11:29 1998
|
||
|
@@ -112,6 +112,7 @@
|
||
|
{
|
||
|
char *ptr;
|
||
|
if (size == 0) return(NULL);
|
||
|
+ size += (sizeof(char *)-(size%sizeof(char *)));
|
||
|
if ((ptr = malloc(size)) == NULL) {
|
||
|
#ifdef ALLOC_DEBUG
|
||
|
print_out1("alloc failed with size = %d", size);
|
||
|
@@ -134,6 +135,7 @@
|
||
|
unsigned size;
|
||
|
{
|
||
|
if (size == 0) return(ptr);
|
||
|
+ size += (sizeof(char *)-(size%sizeof(char *)));
|
||
|
if (ptr == NULL) return(Malloc(size));
|
||
|
#ifdef ALLOC_DEBUG
|
||
|
unregister_debug(ptr);
|
||
|
@@ -153,6 +155,7 @@
|
||
|
{
|
||
|
char *ptr;
|
||
|
if (size == 0) return(NULL);
|
||
|
+ size += (sizeof(char *)-(size%sizeof(char *)));
|
||
|
if ((ptr = calloc(num, size)) == NULL) {
|
||
|
return(NULL);
|
||
|
}
|