From 79436a3bb8824d61001166808de7f9280ee13e56 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 30 Dec 2011 17:44:52 +0000 Subject: [PATCH] cleanup scope of variable `newfp' --- ChangeLog | 4 ++++ src/frontend/inpcom.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40d67e692..0b7b979ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-12-30 Robert Larice + * inpcom.c : + cleanup scope of variable `newfp' + 2011-12-30 Robert Larice * inpcom.c : cleanup scope of variable `big_buff2' diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 032264eec..1193029ea 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -152,7 +152,6 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c size_t max_line_length; /* max. line length in input deck */ - FILE *newfp; FILE *fdo; struct line *tmp_ptr1 = NULL; @@ -295,8 +294,8 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c if ( !found_library ) { bool dir_name_flag = FALSE; + FILE *newfp = inp_pathopen( s, "r" ); - newfp = inp_pathopen( s, "r" ); if ( !newfp ) { char big_buff2[5000]; @@ -383,8 +382,8 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c { bool dir_name_flag = FALSE; + FILE *newfp = inp_pathopen(s, "r"); - newfp = inp_pathopen(s, "r"); if ( !newfp ) { char big_buff2[5000];