diff options
author | Michael McConville <mmcconville@mykolab.com> | 2015-12-08 21:16:52 -0500 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2015-12-09 09:53:57 -0500 |
commit | d95947343e8a52957048b1d0b72c262183f2723f (patch) | |
tree | 94ece9fd39c511e1a460881e6bde7b462c804c93 /to.do | |
parent | 1cc5d870326d0c574a21bbe85457bfc50d6cc43e (diff) |
Removed flex_free()i, corrected buf_destroy logic.
As with flex_alloc(), replace with direct calls to free().
The function buf_destroy is now null safe and the logic was corrected to free()
correctly.
Diffstat (limited to 'to.do')
-rw-r--r-- | to.do/unicode/flexdef.h | 2 | ||||
-rw-r--r-- | to.do/unicode/scan.l | 12 |
2 files changed, 1 insertions, 13 deletions
diff --git a/to.do/unicode/flexdef.h b/to.do/unicode/flexdef.h index 9c0bbd4..74db308 100644 --- a/to.do/unicode/flexdef.h +++ b/to.do/unicode/flexdef.h @@ -663,8 +663,6 @@ extern int num_backing_up, bol_needed; void *allocate_array PROTO((int, size_t)); void *reallocate_array PROTO((void*, int, size_t)); -void flex_free PROTO((void*)); - #define allocate_integer_array(size) \ (int *) allocate_array( size, sizeof( int ) ) diff --git a/to.do/unicode/scan.l b/to.do/unicode/scan.l index 6b8daac..8d372b9 100644 --- a/to.do/unicode/scan.l +++ b/to.do/unicode/scan.l @@ -159,7 +159,7 @@ LEXOPT [aceknopr] [[:digit:]]+ linenum = myctoi( yytext ); \"[^"\n]*\" { - flex_free( (void *) infilename ); + free(infilename); infilename = xstrdup(yytext + 1); infilename[strlen( infilename ) - 1] = '\0'; } @@ -685,13 +685,3 @@ char *file; linenum = 1; } - - -/* Wrapper routines for accessing the scanner's malloc routines. */ - -void flex_free( ptr ) -void *ptr; - { - if ( ptr ) - free( ptr ); - } |