mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
block-vvfat: fix a warning
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
d6dc3d424e
commit
5606c2208b
1 changed files with 6 additions and 3 deletions
|
@ -509,9 +509,12 @@ static inline uint8_t fat_chksum(const direntry_t* entry)
|
|||
uint8_t chksum=0;
|
||||
int i;
|
||||
|
||||
for(i=0;i<11;i++)
|
||||
chksum=(((chksum&0xfe)>>1)|((chksum&0x01)?0x80:0))
|
||||
+(unsigned char)entry->name[i];
|
||||
for(i=0;i<11;i++) {
|
||||
unsigned char c;
|
||||
|
||||
c = (i <= 8) ? entry->name[i] : entry->extension[i-8];
|
||||
chksum=(((chksum&0xfe)>>1)|((chksum&0x01)?0x80:0)) + c;
|
||||
}
|
||||
|
||||
return chksum;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue