summaryrefslogtreecommitdiff
path: root/tests/yyextra.l
diff options
context:
space:
mode:
Diffstat (limited to 'tests/yyextra.l')
-rw-r--r--tests/yyextra.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/yyextra.l b/tests/yyextra.l
index 37e8821..8957cbb 100644
--- a/tests/yyextra.l
+++ b/tests/yyextra.l
@@ -68,11 +68,11 @@ main ()
struct Buffer * buf;
int i;
- buf = (struct Buffer*) malloc(sizeof(struct Buffer));
+ buf = malloc(sizeof(struct Buffer));
buf->curr_len =0;
buf->max_len = 4;
buf->grow_len = 100;
- buf->data = (char*)malloc(buf->max_len);
+ buf->data = malloc(buf->max_len);
testlex_init(&scanner);
testset_in( stdin, scanner);
@@ -100,10 +100,10 @@ static void append_char (char c, yyscan_t scanner )
if( buf->curr_len >= buf->max_len )
{
- new_buf = (struct Buffer*) malloc(sizeof(struct Buffer));
+ new_buf = malloc(sizeof(struct Buffer));
new_buf->max_len = buf->max_len + buf->grow_len;
new_buf->grow_len = buf->grow_len;
- new_buf->data = (char*)malloc(new_buf->max_len);
+ new_buf->data = malloc(new_buf->max_len);
for( new_buf->curr_len = 0;
new_buf->curr_len < buf->curr_len;
new_buf->curr_len++ )