From e53b74c5a18e0225bdf4254413fb360fb05aad4d Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 5 Sep 2005 05:00:42 +0000 Subject: [PATCH] (MTABLE_MALLOC): Don't use a local variable. (MTABLE_ALLOCA): Change the name of local variable. --- src/internal.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/internal.h b/src/internal.h index d32c7de..9a67711 100644 --- a/src/internal.h +++ b/src/internal.h @@ -91,11 +91,10 @@ extern int mdebug_hook (); be one of enum MErrorCode. If the allocation fails, the macro MEMORY_FULL () is called with argument ERR. */ -#define MTABLE_MALLOC(p, size, err) \ - do { \ - int bytes = sizeof (*(p)) * (size); \ - if (! ((p) = (void *) malloc (bytes))) \ - MEMORY_FULL (err); \ +#define MTABLE_MALLOC(p, size, err) \ + do { \ + if (! ((p) = (void *) malloc (sizeof (*(p)) * (size)))) \ + MEMORY_FULL (err); \ } while (0) @@ -131,10 +130,10 @@ extern int mdebug_hook (); #define MTABLE_ALLOCA(p, size, err) \ do { \ - int bytes = sizeof (*(p)) * (size); \ - if (! ((p) = (void *) alloca (bytes))) \ + int allocasize = sizeof (*(p)) * (size); \ + if (! ((p) = (void *) alloca (allocasize))) \ MEMORY_FULL (err); \ - memset ((p), 0, bytes); \ + memset ((p), 0, allocasize); \ } while (0) -- 1.7.10.4