From edca92c10572b6bb7dd60db156f545d98373f803 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 30 Sep 2011 20:19:44 -0700 Subject: Stop wrapping malloc & free Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston --- table11.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'table11.c') diff --git a/table11.c b/table11.c index 02dc5fb..56658b2 100644 --- a/table11.c +++ b/table11.c @@ -248,8 +248,9 @@ DefineEValue( struct ValueListEntry *p; /* define the new value */ - p = (struct ValueListEntry *) - Malloc ((long)(sizeof (struct ValueListEntry))); + p = malloc (sizeof (struct ValueListEntry)); + if (p == NULL) + panic("Can't allocate memory for Enum ValueListEntry"); p->Name = name; p->Value = value; @@ -303,8 +304,9 @@ DefineValues(TYPE type, long value, short length, short ctype, { struct ValueListEntry *p; - p = (struct ValueListEntry *) - Malloc ((long)(sizeof (struct ValueListEntry))); + p = malloc (sizeof (struct ValueListEntry)); + if (p == NULL) + panic("Can't allocate memory for ValueListEntry"); p->Name = name; p->Type = ctype; p->Length = length; -- cgit v1.2.1