diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-03-04 18:57:43 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-04-12 01:02:58 -0400 |
commit | 86ee88163e0da441eea6bff379f848cd71fef788 (patch) | |
tree | ec0b935e15b977d18dfebff9c3c79d55b1857098 /src/nvim/path.c | |
parent | e4975f82c9704aa5d52e18e578a449268654ee37 (diff) | |
download | rneovim-86ee88163e0da441eea6bff379f848cd71fef788.tar.gz rneovim-86ee88163e0da441eea6bff379f848cd71fef788.tar.bz2 rneovim-86ee88163e0da441eea6bff379f848cd71fef788.zip |
passing-by: mark non-null return; remove invalid OOM check.
remove some #ifdef noise
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index 9515205643..80f1947ccf 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -83,15 +83,12 @@ FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname) return kDifferentFiles; } -/// Get the tail of a path: the file name. +/// Gets the tail (i.e., the filename segment) of a path `fname`. /// -/// @param fname A file path. -/// @return -/// - Empty string, if fname is NULL. -/// - The position of the last path separator + 1. (i.e. empty string, if -/// fname ends in a slash). -/// - Never NULL. +/// @return pointer just past the last path separator (empty string, if fname +/// ends in a slash), or empty string if fname is NULL. char_u *path_tail(char_u *fname) + FUNC_ATTR_NONNULL_RET { if (fname == NULL) { return (char_u *)""; |