aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder/dirent_win.c
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /util/folder/dirent_win.c
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'util/folder/dirent_win.c')
-rw-r--r--util/folder/dirent_win.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/folder/dirent_win.c b/util/folder/dirent_win.c
index cabab6bbf9..8eed4801c7 100644
--- a/util/folder/dirent_win.c
+++ b/util/folder/dirent_win.c
@@ -59,8 +59,9 @@ struct DIR* opendir(const char* dirname) {
}
int closedir(struct DIR* dir) {
- if (dir->sh != INVALID_HANDLE_VALUE)
+ if (dir->sh != INVALID_HANDLE_VALUE) {
FindClose(dir->sh);
+ }
free(dir->fff_templ);
free(dir->readdir_buf);
free(dir);
@@ -109,8 +110,9 @@ struct dirent* readdir(struct DIR* dir) {
struct dirent* res;
if (!dir->readdir_buf) {
dir->readdir_buf = (struct dirent*)malloc(sizeof(struct dirent));
- if (dir->readdir_buf == 0)
+ if (dir->readdir_buf == 0) {
return 0;
+ }
}
readdir_r(dir, dir->readdir_buf, &res);
return res;