aboutsummaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/src/filesystem.c6
-rw-r--r--filesystem/src/path.c2
2 files changed, 4 insertions, 4 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) {
27void* read_file(const char* filepath) { 27void* 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}
diff --git a/filesystem/src/path.c b/filesystem/src/path.c
index 2ce5a04..544a5d1 100644
--- a/filesystem/src/path.c
+++ b/filesystem/src/path.c
@@ -21,7 +21,7 @@ path path_new(const char* str) {
21void path_del(path* path) { 21void path_del(path* path) {
22 if (path) { 22 if (path) {
23 free(path->data); 23 free(path->data);
24 path->data = 0; 24 path->data = nullptr;
25 path->size = 0; 25 path->size = 0;
26 } 26 }
27} 27}