summaryrefslogtreecommitdiff
path: root/src/sym.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville@mykolab.com>2015-12-08 21:00:39 -0500
committerWill Estes <westes575@gmail.com>2015-12-09 09:48:39 -0500
commitc53d722b0b4e81b08cfc2f9ff6675a7abe0de2c3 (patch)
tree4e19f81d30f1b2323c0a89a09c0d92359e713634 /src/sym.c
parentc03bef5411d3231f42445932d1971d656f020817 (diff)
Removed flex_alloc; cleaned up style.
The function flex_alloc() was just a wrapper around malloc(). Since this only added unclarity, and the flex_alloc() function is likely a legacy of olden times, remove it in favor of calls to malloc() directly. Style elements cleaned up: * superfluous spacing around parentheses * non-constant initialization in variable declarations * needless casts * almost all uses of assignments as subexpressions
Diffstat (limited to 'src/sym.c')
-rw-r--r--src/sym.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sym.c b/src/sym.c
index 8b08c9f..970d719 100644
--- a/src/sym.c
+++ b/src/sym.c
@@ -88,8 +88,7 @@ static int addsym (char sym[], char *str_def, int int_def, hash_table table, int
}
/* create new entry */
- new_entry = (struct hash_entry *)
- flex_alloc (sizeof (struct hash_entry));
+ new_entry = malloc(sizeof(struct hash_entry));
if (new_entry == NULL)
flexfatal (_("symbol table memory allocation failed"));