summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-01 17:21:04 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-01 18:58:43 +0100
commitd7318352667dc45794072c6a853a882544f02671 (patch)
treedd667a579747a44f6f24f72c28e26374bd0272d9 /hwpfilter
parentff8b9c4e590ff6189b5d7446814a398ab513bd0c (diff)
more efficient check for empty strings
Change-Id: Ibc2f7412b6bf8ef75f93d649812836c01224e43f
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/formula.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx
index ba29996d3723..c29cbee12475 100644
--- a/hwpfilter/source/formula.cxx
+++ b/hwpfilter/source/formula.cxx
@@ -625,7 +625,7 @@ int Formula::parse()
break;
}
// fprintf(stderr,"\n\n[RESULT]\n[%s]\n",a.c_str());
- if( strlen(buf) > 0 )
+ if( buf[0] != '\0' )
res = mainParse( a.c_str() );
else
res = 0L;
@@ -673,7 +673,7 @@ void Formula::trim()
else
break;
}
- if( strlen(buf) > 0 )
+ if( buf[0] != '\0' )
strcpy(eq, buf);
else
eq = 0L;