mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
Cast size_t to long, before applying the unary - operator
svn path=/trunk/; revision=22359
This commit is contained in:
parent
78fce8752c
commit
3949820944
1 changed files with 2 additions and 2 deletions
|
@ -340,7 +340,7 @@ RestoreFile5(
|
||||||
|
|
||||||
/* Update INFO2 */
|
/* Update INFO2 */
|
||||||
/* 1) If not last entry, copy last entry to the current one */
|
/* 1) If not last entry, copy last entry to the current one */
|
||||||
if (SetFilePointer(bin->hInfo, -sizeof(DELETED_FILE_RECORD), NULL, FILE_END) == INVALID_SET_FILE_POINTER)
|
if (SetFilePointer(bin->hInfo, -(LONG)sizeof(DELETED_FILE_RECORD), NULL, FILE_END) == INVALID_SET_FILE_POINTER)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (!ReadFile(bin->hInfo, &LastFile, sizeof(DELETED_FILE_RECORD), &bytesRead, NULL))
|
if (!ReadFile(bin->hInfo, &LastFile, sizeof(DELETED_FILE_RECORD), &bytesRead, NULL))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -374,7 +374,7 @@ RestoreFile5(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
/* 3) Truncate file */
|
/* 3) Truncate file */
|
||||||
if (SetFilePointer(bin->hInfo, -sizeof(DELETED_FILE_RECORD), NULL, FILE_END) == INVALID_SET_FILE_POINTER)
|
if (SetFilePointer(bin->hInfo, -(LONG)sizeof(DELETED_FILE_RECORD), NULL, FILE_END) == INVALID_SET_FILE_POINTER)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (!SetEndOfFile(bin->hInfo))
|
if (!SetEndOfFile(bin->hInfo))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue