summaryrefslogtreecommitdiff
path: root/table11.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-30 20:19:44 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-30 20:19:44 -0700
commitedca92c10572b6bb7dd60db156f545d98373f803 (patch)
tree0f22fb5c4203c48c2a8d7f6a71692f9b689d791d /table11.c
parent93812aa7950342c809a9dcbd9d50379c050b51ac (diff)
downloadxscope-edca92c10572b6bb7dd60db156f545d98373f803.tar.gz
Stop wrapping malloc & free
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'table11.c')
-rw-r--r--table11.c10
1 files changed, 6 insertions, 4 deletions
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;