From f2a0062042edfafab2c0d9472f2669521ff70930 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 17 Jun 2014 02:47:57 +1000 Subject: Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a)) --- source/blender/python/generic/py_capi_utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/python/generic') diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index c0004789faa..54e27a30791 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -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); -- cgit v1.2.3