From 48ecdc22a1454858ba03fc087dd1ce95c3519338 Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Sat, 22 Jun 2002 21:51:30 +0000
Subject: [PATCH]  o cleaned up an unecessary variable definition.

---
 src/common/xmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/xmalloc.c b/src/common/xmalloc.c
index 6c35908f615..b5122ad7a97 100644
--- a/src/common/xmalloc.c
+++ b/src/common/xmalloc.c
@@ -55,6 +55,7 @@ void *_xmalloc(size_t size, const char *file, int line, const char *func)
 	void *new;
 	int *p;
 
+
 	xmalloc_assert(size >= 0 && size <= INT_MAX);
 	MALLOC_LOCK();
 	p = (int *)malloc(size + 2*sizeof(int));
@@ -214,9 +215,8 @@ int _xsize(void *item, const char *file, int line, const char *func)
  */
 void _xfree(void **item, const char *file, int line, const char *func)
 {
-	int *p = (int *)*item - 2;
-
 	if (*item != NULL) {
+		int *p = (int *)*item - 2;
 		/* magic cookie still there? */
 		xmalloc_assert(p[0] == XMALLOC_MAGIC);	
 		MALLOC_LOCK();
-- 
GitLab