summaryrefslogtreecommitdiffstats
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index a6d1a12d10..0ec48a1127 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2447,7 +2447,8 @@ strerror(int err)
#endif
/*
- * Get name of current directory into buffer 'buf' of length 'len' bytes.
+ * Get name of current directory into buffer "buf" of length "len" bytes.
+ * "len" must be at least PATH_MAX.
* Return OK for success, FAIL for failure.
*/
int
@@ -2516,7 +2517,7 @@ mch_FullName(
{
/*
* If the file name has a path, change to that directory for a moment,
- * and then do the getwd() (and get back to where we were).
+ * and then get the directory (and get back to where we were).
* This will get the correct path name with "../" things.
*/
if (p != NULL)
@@ -3124,7 +3125,7 @@ mch_can_exe(char_u *name, char_u **path, int use_path)
p = (char_u *)getenv("PATH");
if (p == NULL || *p == NUL)
return -1;
- buf = alloc((unsigned)(STRLEN(name) + STRLEN(p) + 2));
+ buf = alloc(STRLEN(name) + STRLEN(p) + 2);
if (buf == NULL)
return -1;
@@ -4323,7 +4324,7 @@ build_argv(
/* Break 'shellcmdflag' into white separated parts. This doesn't
* handle quoted strings, they are very unlikely to appear. */
- *shcf_tofree = alloc((unsigned)STRLEN(p_shcf) + 1);
+ *shcf_tofree = alloc(STRLEN(p_shcf) + 1);
if (*shcf_tofree == NULL) /* out of memory */
return FAIL;
s = *shcf_tofree;
@@ -6899,7 +6900,7 @@ mch_expand_wildcards(
&& !mch_can_exe((*file)[i], NULL, !(flags & EW_SHELLCMD)))
continue;
- p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir));
+ p = alloc(STRLEN((*file)[i]) + 1 + dir);
if (p)
{
STRCPY(p, (*file)[i]);