diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-30 20:19:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-30 20:19:44 -0700 |
commit | edca92c10572b6bb7dd60db156f545d98373f803 (patch) | |
tree | 0f22fb5c4203c48c2a8d7f6a71692f9b689d791d /table11.c | |
parent | 93812aa7950342c809a9dcbd9d50379c050b51ac (diff) | |
download | xscope-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.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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; |