bios/disk: Fix always-true comparison warning

This commit is contained in:
mintsuki 2022-09-01 04:42:49 +02:00
parent 1b630659d9
commit 9b3570f043

View File

@ -155,7 +155,7 @@ static bool detect_sector_size(struct volume *volume) {
}
size_t sector_size_a = 0;
for (size_t i = XFER_BUF_SIZE - 1; i >= 0; i--) {
for (long i = XFER_BUF_SIZE - 1; i >= 0; i--) {
if (xfer_buf[i] != 0) {
sector_size_a = i + 1;
break;
@ -174,7 +174,7 @@ static bool detect_sector_size(struct volume *volume) {
}
size_t sector_size_b = 0;
for (size_t i = XFER_BUF_SIZE - 1; i >= 0; i--) {
for (long i = XFER_BUF_SIZE - 1; i >= 0; i--) {
if (xfer_buf[i] != 0xff) {
sector_size_b = i + 1;
break;