minor cleanup. #2610

Update vim_isAbsName() to use bool type
cleanup casts in vim_findfile() and recover_names()

References #2470
This commit is contained in:
Mark Bainter
2015-05-07 21:57:04 -05:00
committed by Justin M. Keyes
parent de7332c0f5
commit 7747bf64d8
3 changed files with 3 additions and 3 deletions

View File

@@ -750,7 +750,7 @@ char_u *vim_findfile(void *search_ctx_arg)
* If the path is a URL don't try this.
*/
if (path_with_url((char *)dirptrs[0])) {
stackp->ffs_filearray = (char_u **)xmalloc(sizeof(char *));
stackp->ffs_filearray = xmalloc(sizeof(char *));
stackp->ffs_filearray[0] = vim_strsave(dirptrs[0]);
stackp->ffs_filearray_size = 1;
} else

View File

@@ -1367,7 +1367,7 @@ recover_names (
char_u *swapname = (char_u *)modname((char *)fname_res, ".swp", TRUE);
if (swapname != NULL) {
if (os_file_exists(swapname)) {
files = (char_u **)xmalloc(sizeof(char_u *));
files = xmalloc(sizeof(char_u *));
files[0] = swapname;
swapname = NULL;
num_files = 1;

View File

@@ -1550,7 +1550,7 @@ int path_with_url(const char *fname)
/*
* Return TRUE if "name" is a full (absolute) path name or URL.
*/
int vim_isAbsName(char_u *name)
bool vim_isAbsName(char_u *name)
{
return path_with_url((char *)name) != 0 || path_is_absolute_path(name);
}