diff --git a/ChangeLog b/ChangeLog index 0b7b979ef..cba9c59fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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' diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 1193029ea..5950b71de 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -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" );