Skip to content

Commit

Permalink
Improve code speed
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdudek committed Feb 14, 2024
1 parent 2212f98 commit 0058e8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion litex/soc/software/liblitedram/sdram.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ static void print_scan_errors(unsigned int errors) {
else
printf("%x", errors);
#else
printf("%d", errors == 0);
int no_errors = errors == 0;
if (no_errors) {
printf("1");
} else {
printf("0");
}
#endif // SDRAM_LEVELING_SCAN_DISPLAY_HEX_DIV
}

Expand Down

0 comments on commit 0058e8d

Please sign in to comment.