summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-10 11:55:54 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-10 17:11:46 +0100
commit581cfc49baddae96b12ed29724e929a2ded1e886 (patch)
treed205a9f5ee3222c7a529de9ee5673c70c18a6ac4 /hwpfilter
parent55663afa0ee1cf36968b278d81fc8ad686de5435 (diff)
Use bool
Change-Id: I161d250d4621dbdf487eea1a66773339b8005412
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hgzip.cxx2
-rw-r--r--hwpfilter/source/hwpeq.cxx3
-rw-r--r--hwpfilter/source/lexer.cxx12
3 files changed, 9 insertions, 8 deletions
diff --git a/hwpfilter/source/hgzip.cxx b/hwpfilter/source/hgzip.cxx
index e1cf5986d8da..20f40d26855b 100644
--- a/hwpfilter/source/hgzip.cxx
+++ b/hwpfilter/source/hgzip.cxx
@@ -241,7 +241,7 @@ int gz_read(gz_stream * file, voidp buf, unsigned len)
int gz_flush(gz_stream * file, int flush)
{
uInt len;
- int done = 0;
+ bool done = false;
gz_stream *s = (gz_stream *) file;
if (s == NULL || s->mode != 'w')
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 68d18933359f..032a928c94e2 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -407,7 +407,8 @@ static char *make_keyword( char *keyword, const char *token)
{
assert(keyword);
char *ptr;
- int result = true, len = strlen(token);
+ bool result = true;
+ int len = strlen(token);
if( 255 < len )
strncpy(keyword, token, 255);
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 9413c730eef4..4cfeff291831 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -156,7 +156,7 @@ struct yy_buffer_state
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
- int yy_is_interactive;
+ bool yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
@@ -1696,7 +1696,7 @@ static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
- int yy_is_jam;
+ bool yy_is_jam;
char *yy_cp = yy_c_buf_p;
YY_CHAR yy_c = 1;
@@ -1848,12 +1848,12 @@ FILE *file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
+ b->yy_is_interactive = true;
#else
#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
+ b->yy_is_interactive = false;
#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+ b->yy_is_interactive = file && isatty( fileno(file) ) > 0;
#endif
#endif
}
@@ -1915,7 +1915,7 @@ yy_size_t size;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
+ b->yy_is_interactive = false;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;