summaryrefslogtreecommitdiff
path: root/src/scan.l
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-05-14 11:16:04 -0700
committerWill Estes <westes575@gmail.com>2015-11-19 19:26:07 -0500
commit0f7b9136ed566f4a79b2d6ca33299babcce3049e (patch)
tree4d7e50ccc92c0917ec491c23aadaf93b5b0c5047 /src/scan.l
parent09eae589d3954a1e1206aa01108ee75ef57776da (diff)
Switch function definitions from mixed K&R to consistent ANSI C.
flex was using K&R function definitions for some functions and ANSI C style in others, sometimes even in the same file. Change the code to consistently use ANSI C. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/scan.l')
-rw-r--r--src/scan.l15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/scan.l b/src/scan.l
index 9eb857a..c1c52ff 100644
--- a/src/scan.l
+++ b/src/scan.l
@@ -969,7 +969,7 @@ nmstr[yyleng - 2 - end_is_ws] = '\0'; /* chop trailing brace */
%%
-int yywrap()
+int yywrap(void)
{
if ( --num_input_files > 0 )
{
@@ -984,8 +984,7 @@ int yywrap()
/* set_input_file - open the given file (if NULL, stdin) for scanning */
-void set_input_file( file )
-char *file;
+void set_input_file( char *file )
{
if ( file && strcmp( file, "-" ) )
{
@@ -1008,21 +1007,17 @@ char *file;
/* Wrapper routines for accessing the scanner's malloc routines. */
-void *flex_alloc( size )
-size_t size;
+void *flex_alloc( size_t size )
{
return (void *) malloc( size );
}
-void *flex_realloc( ptr, size )
-void *ptr;
-size_t size;
+void *flex_realloc( void *ptr, size_t size )
{
return (void *) realloc( ptr, size );
}
-void flex_free( ptr )
-void *ptr;
+void flex_free( void *ptr )
{
if ( ptr )
free( ptr );