summaryrefslogtreecommitdiff
path: root/japanese/FreeWnn-lib/files/patch-aq
blob: d476242347bd9cadcd417b1ef65197c946fb1cad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- 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);
     }