Skip to content

Commit

Permalink
Simplify expression to avoid PVS-Studio warning.
Browse files Browse the repository at this point in the history
Thanks to @dcb314 for reporting this.

This resolves GitHub issue #124.
  • Loading branch information
eeide committed Dec 19, 2016
1 parent af20fb0 commit bb3babc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clex/driver.c
Expand Up @@ -7,7 +7,7 @@
*/

#if HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif

#include <assert.h>
Expand Down Expand Up @@ -308,7 +308,7 @@ static void rm_toks(int idx) {
}
which++;
}
if (!started || (started && which > (idx + n_toks)))
if (!started || (which > (idx + n_toks)))
printf("%s", tok_list[i].str);
}
if (matched) {
Expand Down

0 comments on commit bb3babc

Please sign in to comment.