cleanup, drop variable `found_library'

This commit is contained in:
rlar 2011-12-30 17:46:37 +00:00
parent 79436a3bb8
commit 9f10f87dd9
2 changed files with 8 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2011-12-30 Robert Larice
* inpcom.c :
cleanup, drop variable `found_library'
2011-12-30 Robert Larice
* inpcom.c :
cleanup scope of variable `newfp'

View File

@ -156,7 +156,7 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
struct line *tmp_ptr1 = NULL;
int i, j;
bool found_library, found_lib_name, found_end = FALSE, shell_eol_continuation = FALSE;
bool found_lib_name, found_end = FALSE, shell_eol_continuation = FALSE;
char *s_ptr, *s_lower;
@ -283,15 +283,11 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
for(s_ptr = s_lower; *s_ptr && (*s_ptr != '\n'); s_ptr++)
*s_ptr = (char) tolower(*s_ptr);
found_library = FALSE;
for ( i = 0; i < num_libraries; i++ ) {
if ( strcmp( library_file[i], s_lower ) == 0 ) {
found_library = TRUE;
for ( i = 0; i < num_libraries; i++ )
if ( strcmp( library_file[i], s_lower ) == 0 )
break;
}
}
if ( !found_library ) {
if ( i >= num_libraries ) {
bool dir_name_flag = FALSE;
FILE *newfp = inp_pathopen( s, "r" );