Commit cf28f12a authored by Sean McBride's avatar Sean McBride
Browse files

fixed cppcheck warning about <= with unsigned

Use == instead of <=
parent 3111a22c
......@@ -3882,7 +3882,7 @@ static int yy_get_next_buffer (void)
yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
while ( num_to_read == 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
......@@ -3895,7 +3895,7 @@ static int yy_get_next_buffer (void)
{
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
if ( new_size == 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
......
......@@ -18,6 +18,8 @@ Modify lex.yy.c:
- replace "#line" lines with blank lines
- remove usage of the "register" keyword
- add a prototype for isatty
- fixed 2 cppcheck warnings about "checking if unsigned variable
is less than zero" around lines 3670 and 3683 by changing <= to ==
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment