Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/pci_ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ static inline void lba_to_msf(uint8_t *buf, int lba)
{
lba += 150;
buf[0] = (uint8_t) ((lba / 75) / 60);
buf[1] = (lba / 75) % 60;
buf[2] = lba % 75;
buf[1] = (uint8_t) ((lba / 75) % 60);
buf[2] = (uint8_t) (lba % 75);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/vmm/io/vatpit.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pit_update_counter(struct vatpit *vatpit, struct channel *c, bool latch)

delta_ticks = (sbinuptime() - c->now_sbt) / vatpit->freq_sbt;

lval = c->initial - delta_ticks % c->initial;
lval = (uint16_t) (c->initial - delta_ticks % c->initial);

if (latch) {
c->olbyte = 2;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/vmm/vmm_instruction_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ emulate_bittest(void *vm, int vcpuid, uint64_t gpa, struct vie *vie,
* "Range of Bit Positions Specified by Bit Offset Operands"
*/
bitmask = vie->opsize * 8 - 1;
bitoff = vie->immediate & bitmask;
bitoff = (int) (vie->immediate & bitmask);

/* Copy the bit into the Carry flag in %rflags */
if (val & (1UL << bitoff))
Expand Down