summaryrefslogtreecommitdiff
path: root/src/dfa.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville@mykolab.com>2015-12-07 19:44:10 -0500
committerWill Estes <westes575@gmail.com>2015-12-07 21:28:21 -0500
commitc03bef5411d3231f42445932d1971d656f020817 (patch)
tree90040d0915d1bd68db3a70fc011d56135909eaaa /src/dfa.c
parent53e3088d75eb966101e4f229a0fe8e0fdd73ab7e (diff)
Remove allocation casts
Diffstat (limited to 'src/dfa.c')
-rw-r--r--src/dfa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/dfa.c b/src/dfa.c
index f96874d..442b25a 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -511,15 +511,13 @@ void ntod (void)
* So we'll have to realloc() on the way...
* we'll wait until we can calculate yynxt_tbl->td_hilen.
*/
- yynxt_tbl =
- (struct yytbl_data *) calloc (1,
- sizeof (struct
- yytbl_data));
+ yynxt_tbl = calloc(1, sizeof (struct yytbl_data));
+
yytbl_data_init (yynxt_tbl, YYTD_ID_NXT);
yynxt_tbl->td_hilen = 1;
yynxt_tbl->td_lolen = num_full_table_rows;
yynxt_tbl->td_data = yynxt_data =
- (flex_int32_t *) calloc (yynxt_tbl->td_lolen *
+ calloc(yynxt_tbl->td_lolen *
yynxt_tbl->td_hilen,
sizeof (flex_int32_t));
yynxt_curr = 0;
@@ -703,7 +701,7 @@ void ntod (void)
/* Each time we hit here, it's another td_hilen, so we realloc. */
yynxt_tbl->td_hilen++;
yynxt_tbl->td_data = yynxt_data =
- (flex_int32_t *) realloc (yynxt_data,
+ realloc (yynxt_data,
yynxt_tbl->td_hilen *
yynxt_tbl->td_lolen *
sizeof (flex_int32_t));