diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-15 12:44:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-15 13:02:15 +0900 |
| commit | 8619ba6a3850145981c0ee6e86e12a7e25946705 (patch) | |
| tree | 1a953bfcf0facdfee0468e33302daeabaa5f0b64 /mrbgems/mruby-io | |
| parent | e5e7bd29efd49c4c207da2985610c9ad878d40b0 (diff) | |
| download | mruby-8619ba6a3850145981c0ee6e86e12a7e25946705.tar.gz mruby-8619ba6a3850145981c0ee6e86e12a7e25946705.zip | |
Use `struct` initializer instead of `memset`.
Diffstat (limited to 'mrbgems/mruby-io')
| -rw-r--r-- | mrbgems/mruby-io/src/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index a19858a63..fe7861798 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -88,7 +88,7 @@ flock(int fd, int operation) { DWORD flags; flags = ((operation & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY : 0) | ((operation & LOCK_SH) ? LOCKFILE_EXCLUSIVE_LOCK : 0); - memset(&ov, 0, sizeof(ov)); + ov = (OVERLAPPED){0}; return LockFileEx(h, flags, 0, 0xffffffff, 0xffffffff, &ov) ? 0 : -1; } #endif |
