patch 9.1.1460: MS-Windows: too many strlen() calls in os_win32.c
Problem: MS-Windows: too many strlen() calls in os_win32.c
Solution: refactor code and remove calls to strlen() and wcscat()
(John Marriott)
This commit does the following changes:
- in mch_get_exe_name():
- refactor to remove call to wcsrchr().
- refactor to replace calls to wcscat() with wcscpy().
- move variables closer to where they are used.
- change test to make sure that concatenating path and exe_pathw
will fit inside the environment string (taking into account that
path may be NULL).
- in executable_exists():
- add namelen argument.
- use string_T to store some strings.
- refactor to remove calls to STRLEN() (via STRCAT()).
- in mch_getperm():
- move call to mch_stat() into return statement and drop unneeded
variable.
- in mch_wrename():
- refactor to use wide character comparisons.
- some cosmetic code styling changes (removing extraneous spaces, etc).
closes: 17542
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/version.c b/src/version.c
index 327e8c8..64e0e78 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1460,
+/**/
1459,
/**/
1458,