summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/grammar.cxx5
-rw-r--r--hwpfilter/source/hwpeq.cxx2
2 files changed, 3 insertions, 4 deletions
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index 77984b97c9fa..42185466b88e 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -1238,11 +1238,10 @@ void yyerror(const char * /*err*/)
{
// printf("REALKING ERR[%s]\n",err);
// if error, delete all nodes.
- Node *pNode = 0L;
int ncount = nodelist.size();
for( int i = 0 ; i < ncount ; i++){
- pNode = nodelist.front();
- nodelist.pop_front();
+ Node *pNode = nodelist.front();
+ nodelist.pop_front();
delete pNode;
}
top = 0L;
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 393a6dbea19d..732b2299168c 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -674,12 +674,12 @@ static char eq2ltxconv(MzString& sstr, istream *strm, const char *sentinel)
MzString white, token;
char key[256];
int ch, result;
- const hwpeq *eq = 0;
while( 0 != (result = next_token(white, token, strm)) ) {
if( sentinel && (result == 1) && strchr(sentinel, token[0]) )
break;
make_keyword(key, token);
+ const hwpeq *eq = 0;
if( (eq = lookup_eqn(key)) != 0 ) {
if( eq->latex )
strcpy(key, eq->latex);