Ticket #44130

path_finding.c: Asserts comparing things to TRUE

Open Date: 2022-03-17 10:59 Last Update: 2022-04-18 12:30

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
3

Details

path_finding.c has some asserts where a value is compared to TRUE with a '=='. One should not do that as TRUE is a macro with specific value (1), and does not match other (non-zero) values though those too indicate true.

Ticket History (3/11 Histories)

2022-03-17 10:59 Updated by: cazfi
  • New Ticket "path_finding.c: Asserts comparing things to TRUE" created
2022-03-17 11:47 Updated by: cazfi
Comment

There's more of them all around the codebase when one greps for "TRUE ==", "FALSE ==", "== TRUE", "== FALSE", "TRUE !=", "FALSE !=", "!= TRUE", "!= FALSE"

Not all of them even in asserts. Limiting scope of this ticket to asserts, though.

2022-03-18 04:39 Updated by: cazfi
2022-04-09 04:24 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-04-12 15:10 Updated by: cazfi
  • Resolution Update from Accepted to None
Comment

S3_0 version misses savegame2.c (at least) "load_success == TRUE" case.

2022-04-13 02:04 Updated by: cazfi
  • Resolution Update from None to Accepted
Comment

Reply To cazfi

S3_0 version misses savegame2.c (at least) "load_success == TRUE" case.

- Fixed

2022-04-17 13:00 Updated by: cazfi
Comment

Reply To cazfi

Not all of them even in asserts. Limiting scope of this ticket to asserts, though.

Rest -> #44401

2022-04-18 12:30 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login