diff options
Diffstat (limited to 'filesystem/src/filesystem.c')
-rw-r--r-- | filesystem/src/filesystem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/filesystem/src/filesystem.c b/filesystem/src/filesystem.c index b228e85..b0c207a 100644 --- a/filesystem/src/filesystem.c +++ b/filesystem/src/filesystem.c | |||
@@ -27,11 +27,11 @@ size_t get_file_size(FILE* file) { | |||
27 | void* read_file(const char* filepath) { | 27 | void* read_file(const char* filepath) { |
28 | assert(filepath); | 28 | assert(filepath); |
29 | 29 | ||
30 | void* data = 0; | 30 | void* data = nullptr; |
31 | 31 | ||
32 | FILE* file = fopen(filepath, "rb"); | 32 | FILE* file = fopen(filepath, "rb"); |
33 | if (!file) { | 33 | if (!file) { |
34 | return 0; | 34 | return nullptr; |
35 | } | 35 | } |
36 | const size_t file_size = get_file_size(file); | 36 | const size_t file_size = get_file_size(file); |
37 | if (file_size == (size_t)-1) { | 37 | if (file_size == (size_t)-1) { |
@@ -53,5 +53,5 @@ cleanup: | |||
53 | if (data) { | 53 | if (data) { |
54 | free(data); | 54 | free(data); |
55 | } | 55 | } |
56 | return 0; | 56 | return nullptr; |
57 | } | 57 | } |