Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mcpp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ int mcpp_lib_main
inc_dirp = &null; /* Initialize to current (null) directory */
cur_fname = cur_fullname = "(predefined)"; /* For predefined macros */
init_defines(); /* Predefine macros */
mb_init(TRUE); /* Should be initialized prior to get options */
mb_init(); /* Should be initialized prior to get options */
do_options( argc, argv, &in_file, &out_file); /* Command line options */

/* Open input file, "-" means stdin. */
Expand Down
10 changes: 5 additions & 5 deletions system.c
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ static int open_file(
if (! fullname) /* Non-existent or directory */
return FALSE;
if (included( fullname)) /* Once included */
goto true;
goto exit_success;

if ((max_open != 0 && max_open <= include_nest)
/* Exceed the known limit of open files */
Expand All @@ -1765,12 +1765,12 @@ static int open_file(
if ((fp = mcpp_fopen( fullname, "r")) == NULL) {
file->fp = mcpp_fopen( cur_fullname, "r");
fseek( file->fp, file->pos, SEEK_SET);
goto false;
goto exit_fail;
}
if (max_open == 0) /* Remember the limit of the system */
max_open = include_nest;
} else if (fp == NULL) /* No read permission */
goto false;
goto exit_fail;
/* Truncate buffer of the includer to save memory */
len = (int) (file->bptr - file->buffer);
if (len) {
Expand Down Expand Up @@ -1802,9 +1802,9 @@ static int open_file(
if (mkdep && ((mkdep & MD_SYSHEADER) || ! infile->sys_header))
put_depend( fullname); /* Output dependency line */

true:
exit_success:
return TRUE;
false:
exit_fail:
free( fullname);
return FALSE;
}
Expand Down