Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
* win32/win32.c (winnt_stat): use numberof macro instead of constant.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Dec 21, 2016
1 parent 5d6ace6 commit de59178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win32/win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit de59178

Please sign in to comment.