diff options
author | David Robillard <d@drobilla.net> | 2023-02-04 19:25:22 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-02-04 19:25:22 -0500 |
commit | 5a9787b4247c6735cc3213944945e8983002edf9 (patch) | |
tree | 635a8711a53b9e50d7dcd24dc4acefefce694c3d /src/win32/filesystem_win32.c | |
parent | c4b3814edad510c6c124089822bd5506f9334411 (diff) | |
download | zix-5a9787b4247c6735cc3213944945e8983002edf9.tar.gz zix-5a9787b4247c6735cc3213944945e8983002edf9.tar.bz2 zix-5a9787b4247c6735cc3213944945e8983002edf9.zip |
Suppress/fix clang-tidy warnings on Windows
Diffstat (limited to 'src/win32/filesystem_win32.c')
-rw-r--r-- | src/win32/filesystem_win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/filesystem_win32.c b/src/win32/filesystem_win32.c index 0484684..0038189 100644 --- a/src/win32/filesystem_win32.c +++ b/src/win32/filesystem_win32.c @@ -90,7 +90,7 @@ zix_create_temporary_directory(ZixAllocator* const allocator, // Ensure that the pattern ends with "XXXXXX" const size_t length = strlen(path_pattern); - if (length < 7 || strcmp(path_pattern + length - 6, "XXXXXX")) { + if (length < 7 || !!strcmp(path_pattern + length - 6, "XXXXXX")) { errno = EINVAL; return NULL; } @@ -206,7 +206,7 @@ zix_canonical_path(ZixAllocator* const allocator, const char* const path) } char* const final = (char*)zix_calloc(allocator, final_size + 1U, 1U); - if (final && !GetFinalPathNameByHandle(h, final, final_size + 1U, flags)) { + if (!final || !GetFinalPathNameByHandle(h, final, final_size + 1U, flags)) { zix_free(allocator, final); CloseHandle(h); return NULL; |