Skip to content

Commit

Permalink
Merge pull request #2832 from dtcenter/feature_2673_sonarqube_1_to_true
Browse files Browse the repository at this point in the history
#2673 Changed literal 1 to the boolean value, true
  • Loading branch information
hsoh-u authored Mar 7, 2024
2 parents 0b2a7da + 0ab2466 commit 4d7d4a2
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/basic/enum_to_string/my_enum_scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if ( first_call ) { init(); first_call = false; }

yytext = (char *) lexeme;

while ( 1 ) {
while ( true ) {

t = next_token();

Expand Down Expand Up @@ -174,7 +174,7 @@ int c, c2;
// skip whitespace
//

while ( 1 ) {
while ( true ) {

c = nextchar();

Expand Down Expand Up @@ -600,7 +600,7 @@ c1 = nextchar();
c2 = nextchar();


while ( 1 ) {
while ( true ) {

if ( (c1 == EOF) || (c2 == EOF) ) break;

Expand Down Expand Up @@ -629,7 +629,7 @@ void do_cpp_comment()
int c;


while ( 1 ) {
while ( true ) {

c = nextchar();

Expand Down
2 changes: 1 addition & 1 deletion src/basic/vx_config/config.tab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@ DictionaryEntry e;

count = 0;

while ( 1 ) {
while ( true ) {

v = icvs.pop();

Expand Down
2 changes: 1 addition & 1 deletion src/basic/vx_config/config_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ void recursive_envs(string & line)

{

while ( 1 ) {
while ( true ) {

if ( ! replace_env(line) ) break;

Expand Down
10 changes: 5 additions & 5 deletions src/basic/vx_config/my_config_scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ if ( first_call ) { init(); first_call = false; }

configtext = (char *) lexeme;

while ( 1 ) {
while ( true ) {

t = next_token();

Expand Down Expand Up @@ -218,7 +218,7 @@ int c, c2;
// skip whitespace
//

while ( 1 ) {
while ( true ) {

c = nextchar();

Expand Down Expand Up @@ -827,7 +827,7 @@ c1 = nextchar();
c2 = nextchar();


while ( 1 ) {
while ( true ) {

if ( (c1 == eof) || (c2 == eof) ) break;

Expand Down Expand Up @@ -858,7 +858,7 @@ int c = 0;

reading_comment = true;

while ( 1 ) {
while ( true ) {

if ( configin->eof() ) break;

Expand Down Expand Up @@ -1034,7 +1034,7 @@ if ( c == '$' ) {

env_value = e;

while ( 1 ) {
while ( true ) {

if ( ! replace_env(env_value) ) break;

Expand Down
2 changes: 1 addition & 1 deletion src/basic/vx_util/command_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ a.clear();

count = 0;

while ( 1 ) {
while ( true ) {

k = pos + count;

Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_afm/afm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ ascii_code = tok.i;
c.ascii_code = ascii_code;


while ( 1 ) {
while ( true ) {
tok = line.nexttoken();

if ( tok.type == afm_token_endofline ) break;
Expand Down Expand Up @@ -2024,7 +2024,7 @@ c.pcc = new PCC [c.n_parts];

n_pcc = 0;

while ( 1 ) {
while ( true ) {

tok = line.nexttoken();

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_afm/afm_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ extern istream & operator>>(istream & in, AfmLine & L)

L.clear();

while ( 1 ) {
while ( true ) {

L.Line.read_line(in);

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_bool_calc/make_program.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tiz.set(input);

////////////////

while ( 1 ) {
while ( true ) {

tok = tiz.next_token();

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_bool_calc/tokenizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ char c, c2;
// skip whitespace
//

while ( 1 ) {
while ( true ) {

c = source[pos];

Expand Down
8 changes: 4 additions & 4 deletions src/libcode/vx_color/my_color_scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if ( first_call ) { init(); first_call = false; }

colortext = (char *) lexeme;

while ( 1 ) {
while ( true ) {

t = next_token();

Expand Down Expand Up @@ -156,7 +156,7 @@ int c, c2;
// skip whitespace
//

while ( 1 ) {
while ( true ) {

c = nextchar();

Expand Down Expand Up @@ -765,7 +765,7 @@ c1 = nextchar();
c2 = nextchar();


while ( 1 ) {
while ( true ) {

if ( (c1 == EOF) || (c2 == EOF) ) break;

Expand Down Expand Up @@ -794,7 +794,7 @@ void do_cpp_comment()
int c;


while ( 1 ) {
while ( true ) {

c = nextchar();

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_pxm/pbm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ if ( (c1 != 'P') || (c2 != '4') ) {

skip_whitespace(in);

while ( 1 ) {
while ( true ) {

j = in.peek();

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_pxm/pcm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ if ( (c1 != 'P') || (c2 != '9') ) {

skip_whitespace(in);

while ( 1 ) {
while ( true ) {

j = in.peek();

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_pxm/pgm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ if ( (c1 != 'P') || (c2 != '5') ) {

skip_whitespace(in);

while ( 1 ) {
while ( true ) {

j = in.peek();

Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_pxm/ppm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ if ( (c1 != 'P') || (c2 != '6') ) {

skip_whitespace(in);

while ( 1 ) {
while ( true ) {

j = in.peek();

Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_pxm/pxm_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void skip_whitespace(istream & in)

int c;

while ( 1 ) {
while ( true ) {

c = in.peek();

Expand Down Expand Up @@ -82,7 +82,7 @@ in.get(c); // toss leading '#'

k = 0;

while ( 1 ) {
while ( true ) {

in.get(c);

Expand Down
2 changes: 1 addition & 1 deletion src/tools/dev_utils/nceptab_to_flat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ if ( !found ) {
//


while ( 1 ) {
while ( true ) {

line.read_line(in);

Expand Down

0 comments on commit 4d7d4a2

Please sign in to comment.