summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 08:13:42 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-21 08:13:42 (GMT)
commitde59178aaf171674a3c2c06cc6271a673a3f9035 (patch)
tree1e489a0c8a6fa44bec2991d785bfb2ef96e0b47e /win32/win32.c
parent5d6ace6121ae07ba603ae2c5b6e4593449875e6f (diff)
* 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index decf818..385bda6 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);