summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/filesystem.c9
-rw-r--r--test/meson.build1
2 files changed, 5 insertions, 5 deletions
diff --git a/src/filesystem.c b/src/filesystem.c
index 95005ae..61487e9 100644
--- a/src/filesystem.c
+++ b/src/filesystem.c
@@ -49,17 +49,18 @@ zix_create_directories(ZixAllocator* const allocator,
// Create each directory down the path
while (p.state != ZIX_PATH_END) {
- const char old_end = path[p.range.end];
+ char* const end = &path[p.range.end];
+ const char old_last = *end;
- path[p.range.end] = '\0';
+ *end = '\0';
if (zix_file_type(path) != ZIX_FILE_TYPE_DIRECTORY) {
if ((st = zix_create_directory(path))) {
break;
}
}
- path[p.range.end] = old_end;
- p = zix_path_next(path, p);
+ *end = old_last;
+ p = zix_path_next(path, p);
}
zix_free(allocator, path);
diff --git a/test/meson.build b/test/meson.build
index 1857180..166de7d 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -50,7 +50,6 @@ if not meson.is_subproject() and get_option('lint')
'--project=' + compdb_path,
'--suppress=constParameterCallback',
'--suppress=constParameterPointer',
- '--suppress=selfAssignment',
'--suppress=unreadVariable',
'-q',
],