diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-21 08:13:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-21 08:13:42 +0000 |
commit | c0c1f874f0d3009611c7374ba6387896bf3a2d0f (patch) | |
tree | 1e489a0c8a6fa44bec2991d785bfb2ef96e0b47e /win32/win32.c | |
parent | 7d9707a0f41cc377a841a811e5bc52c71c58651c (diff) | |
download | ruby-c0c1f874f0d3009611c7374ba6387896bf3a2d0f.tar.gz |
* win32/win32.c (winnt_stat): use `numberof` macro instead of constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index decf81846d..385bda64c9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -5560,7 +5560,7 @@ winnt_stat(const WCHAR *path, struct stati64 *st) } st->st_mode = fileattr_to_unixmode(attr, path); if (len) { - finalname[min(len, PATH_MAX-1)] = L'\0'; + finalname[min(len, numberof(finalname)-1)] = L'\0'; path = finalname; if (wcsncmp(path, namespace_prefix, numberof(namespace_prefix)) == 0) path += numberof(namespace_prefix); |