summaryrefslogtreecommitdiff
path: root/table11.c
diff options
context:
space:
mode:
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;