mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 14:05:22 -04:00
[misc] fix some Coverity warnings
This commit is contained in:
parent
436584fcc0
commit
8538ce0590
7 changed files with 14 additions and 9 deletions
|
@ -1526,9 +1526,11 @@ BOOL DumpFatDir(const char* path, int32_t cluster)
|
|||
written = 0;
|
||||
s = libfat_clustertosector(lf_fs, dirpos.cluster);
|
||||
while ((s != 0) && (s < 0xFFFFFFFFULL) && (written < diritem.size)) {
|
||||
buf = libfat_get_sector(lf_fs, s);
|
||||
if (buf == NULL)
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_SECTOR_NOT_FOUND;
|
||||
if (FormatStatus)
|
||||
goto out;
|
||||
buf = libfat_get_sector(lf_fs, s);
|
||||
size = MIN(LIBFAT_SECTOR_SIZE, diritem.size - written);
|
||||
if (!WriteFileWithRetry(handle, buf, size, &size, WRITE_RETRIES) ||
|
||||
(size != MIN(LIBFAT_SECTOR_SIZE, diritem.size - written))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue