From 13556ea5ee72c4d0fd94693ebf58d3bcde8d59f7 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 17 Jul 2006 13:59:09 +0000 Subject: * ext/io/wait/wait.c (io_ready_p): protoize. * pack.c (define_swapx): should not use plain malloc. * ext/curses/curses.c (curses_getmouse): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- pack.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pack.c') diff --git a/pack.c b/pack.c index 8ff90369fc..ea81868ae5 100644 --- a/pack.c +++ b/pack.c @@ -52,18 +52,17 @@ #define define_swapx(x, xtype) \ static xtype \ -TOKEN_PASTE(swap,x)(z) \ - xtype z; \ +TOKEN_PASTE(swap,x)(xtype z) \ { \ xtype r; \ xtype *zp; \ unsigned char *s, *t; \ int i; \ \ - zp = malloc(sizeof(xtype)); \ + zp = xmalloc(sizeof(xtype)); \ *zp = z; \ s = (unsigned char*)zp; \ - t = malloc(sizeof(xtype)); \ + t = xmalloc(sizeof(xtype)); \ for (i=0; i