---
mingw-w64-crt/stdio/_findfirst64i32.c | 2 +-
mingw-w64-crt/stdio/_findnext64i32.c | 2 +-
mingw-w64-crt/stdio/_fstat64i32.c | 2 +-
mingw-w64-crt/stdio/_stat.c | 4 ++--
mingw-w64-crt/stdio/_stat64i32.c | 2 +-
mingw-w64-crt/stdio/_wfindfirst64i32.c | 2 +-
mingw-w64-crt/stdio/_wfindnext64i32.c | 2 +-
mingw-w64-crt/stdio/_wstat.c | 4 ++--
mingw-w64-crt/stdio/_wstat64i32.c | 2 +-
9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/mingw-w64-crt/stdio/_findfirst64i32.c
b/mingw-w64-crt/stdio/_findfirst64i32.c
index 8942dc153..020ecee6a 100644
--- a/mingw-w64-crt/stdio/_findfirst64i32.c
+++ b/mingw-w64-crt/stdio/_findfirst64i32.c
@@ -7,7 +7,7 @@ intptr_t __cdecl _findfirst64i32(const char *_Filename,struct
_finddata64i32_t *
struct __finddata64_t fd;
intptr_t ret = _findfirst64(_Filename,&fd);
if (ret == -1) {
- memset(_FindData,0,sizeof(struct _finddata64i32_t));
+ *_FindData = (struct _finddata64i32_t){0};
return -1;
}
_FindData->attrib=fd.attrib;
diff --git a/mingw-w64-crt/stdio/_findnext64i32.c
b/mingw-w64-crt/stdio/_findnext64i32.c
index 90ae45443..e756846b9 100644
--- a/mingw-w64-crt/stdio/_findnext64i32.c
+++ b/mingw-w64-crt/stdio/_findnext64i32.c
@@ -7,7 +7,7 @@ int __cdecl _findnext64i32(intptr_t _FindHandle,struct
_finddata64i32_t *_FindDa
struct __finddata64_t fd;
int ret = _findnext64(_FindHandle,&fd);
if (ret == -1) {
- memset(_FindData,0,sizeof(struct _finddata64i32_t));
+ *_FindData = (struct _finddata64i32_t){0};
return -1;
}
_FindData->attrib=fd.attrib;
diff --git a/mingw-w64-crt/stdio/_fstat64i32.c
b/mingw-w64-crt/stdio/_fstat64i32.c
index 57cc492d7..7e71f2e80 100644
--- a/mingw-w64-crt/stdio/_fstat64i32.c
+++ b/mingw-w64-crt/stdio/_fstat64i32.c
@@ -6,7 +6,7 @@ int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
struct _stat64 st;
int ret=_fstat64(_FileDes,&st);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct _stat64i32));
+ *_Stat = (struct _stat64i32){0};
return -1;
}
_Stat->st_dev=st.st_dev;
diff --git a/mingw-w64-crt/stdio/_stat.c b/mingw-w64-crt/stdio/_stat.c
index fbb985e38..cc39a90af 100644
--- a/mingw-w64-crt/stdio/_stat.c
+++ b/mingw-w64-crt/stdio/_stat.c
@@ -74,7 +74,7 @@ stat(const char *_Filename,struct stat *_Stat)
free (_path);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct stat));
+ *_Stat = (struct stat){0};
return -1;
}
/* struct stat and struct _stat32
@@ -95,7 +95,7 @@ stat(const char *_Filename,struct stat *_Stat)
free (_path);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct stat));
+ *_Stat = (struct stat){0};
return -1;
}
/* struct stat and struct _stat64i32
diff --git a/mingw-w64-crt/stdio/_stat64i32.c b/mingw-w64-crt/stdio/_stat64i32.c
index 19adf5b0e..e288470ea 100644
--- a/mingw-w64-crt/stdio/_stat64i32.c
+++ b/mingw-w64-crt/stdio/_stat64i32.c
@@ -69,7 +69,7 @@ int __cdecl _stat64i32(const char *_Name,struct _stat64i32
*_Stat)
free(_path);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct _stat64i32));
+ *_Stat = (struct _stat64i32){0};
return -1;
}
_Stat->st_dev=st.st_dev;
diff --git a/mingw-w64-crt/stdio/_wfindfirst64i32.c
b/mingw-w64-crt/stdio/_wfindfirst64i32.c
index d355e524e..6cfe849f3 100644
--- a/mingw-w64-crt/stdio/_wfindfirst64i32.c
+++ b/mingw-w64-crt/stdio/_wfindfirst64i32.c
@@ -7,7 +7,7 @@ intptr_t __cdecl _wfindfirst64i32(const wchar_t
*_Filename,struct _wfinddata64i3
struct _wfinddata64_t fd;
intptr_t ret = _wfindfirst64(_Filename,&fd);
if (ret == -1) {
- memset(_FindData,0,sizeof(struct _wfinddata64i32_t));
+ *_FindData = (struct _wfinddata64i32_t){0};
return -1;
}
_FindData->attrib=fd.attrib;
diff --git a/mingw-w64-crt/stdio/_wfindnext64i32.c
b/mingw-w64-crt/stdio/_wfindnext64i32.c
index c8d534275..9753916ea 100644
--- a/mingw-w64-crt/stdio/_wfindnext64i32.c
+++ b/mingw-w64-crt/stdio/_wfindnext64i32.c
@@ -7,7 +7,7 @@ int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct
_wfinddata64i32_t *_Find
struct _wfinddata64_t fd;
int ret = _wfindnext64(_FindHandle,&fd);
if (ret == -1) {
- memset(_FindData,0,sizeof(struct _wfinddata64i32_t));
+ *_FindData = (struct _wfinddata64i32_t){0};
return -1;
}
_FindData->attrib=fd.attrib;
diff --git a/mingw-w64-crt/stdio/_wstat.c b/mingw-w64-crt/stdio/_wstat.c
index 08566168f..fb6b1c69e 100644
--- a/mingw-w64-crt/stdio/_wstat.c
+++ b/mingw-w64-crt/stdio/_wstat.c
@@ -76,7 +76,7 @@ wstat(const wchar_t *_Filename,struct stat *_Stat)
free (_path);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct stat));
+ *_Stat = (struct stat){0};
return -1;
}
/* struct stat and struct _stat32
@@ -97,7 +97,7 @@ wstat(const wchar_t *_Filename,struct stat *_Stat)
free (_path);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct stat));
+ *_Stat = (struct stat){0};
return -1;
}
/* struct stat and struct _stat64i32
diff --git a/mingw-w64-crt/stdio/_wstat64i32.c
b/mingw-w64-crt/stdio/_wstat64i32.c
index d6ee07a3d..b17c50574 100644
--- a/mingw-w64-crt/stdio/_wstat64i32.c
+++ b/mingw-w64-crt/stdio/_wstat64i32.c
@@ -69,7 +69,7 @@ int __cdecl _wstat64i32(const wchar_t *_Name,struct
_stat64i32 *_Stat)
free(_path);
if (ret == -1) {
- memset(_Stat,0,sizeof(struct _stat64i32));
+ *_Stat = (struct _stat64i32){0};
return -1;
}
_Stat->st_dev=st.st_dev;
--
2.48.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public