Skip to content

Commit

Permalink
User: Refactored UserWriteFile().
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailKrichanov authored and vit9696 committed Dec 28, 2022
1 parent 1a8f88b commit c4c6939
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion User/Include/UserFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ UserReadFile (
VOID
UserWriteFile (
IN CONST CHAR8 *FileName,
IN VOID *Data,
IN CONST VOID *Data,
IN UINT32 Size
);

Expand Down
5 changes: 4 additions & 1 deletion User/Library/UserFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,15 @@ UserReadFile (
VOID
UserWriteFile (
IN CONST CHAR8 *FileName,
IN VOID *Data,
IN CONST VOID *Data,
IN UINT32 Size
)
{
FILE *FilePtr;

ASSERT (FileName != NULL);
ASSERT (Data != NULL);

FilePtr = fopen (FileName, "wb");

if (FilePtr == NULL) {
Expand Down

0 comments on commit c4c6939

Please sign in to comment.