Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a))

This commit is contained in:
2014-06-17 02:47:57 +10:00
parent a6e290166b
commit f2a0062042
13 changed files with 18 additions and 17 deletions

View File

@@ -606,8 +606,7 @@ void PyC_SetHomePath(const char *py_path_bundle)
/* cant use this, on linux gives bug: #23018, TODO: try LANG="en_US.UTF-8" /usr/bin/blender, suggested 22008 */
/* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */
BLI_strncpy_wchar_from_utf8(py_path_bundle_wchar, py_path_bundle,
sizeof(py_path_bundle_wchar) / sizeof(wchar_t));
BLI_strncpy_wchar_from_utf8(py_path_bundle_wchar, py_path_bundle, ARRAY_SIZE(py_path_bundle_wchar));
Py_SetPythonHome(py_path_bundle_wchar);
// printf("found python (wchar_t) '%ls'\n", py_path_bundle_wchar);