From 0ceebc2c913cc497735e001772cb6b395c36cecc Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 30 Jun 2014 02:23:41 -0400 Subject: os_open: add unit tests --- src/nvim/os/fs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index ff8b8557de..dce95eb3c9 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -11,7 +11,6 @@ #include "nvim/misc2.h" #include "nvim/path.h" #include "nvim/strings.h" -#include "nvim/log.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "os/fs.c.generated.h" @@ -156,16 +155,16 @@ static bool is_executable_in_path(const char_u *name) /// calls (read, write, lseek, fcntl, etc.). If the operation fails, `-errno` /// is returned, and no file is created or modified. /// -/// @param flags bitwise OR of flags defined in -/// @param mode permissions for the newly-created file (IGNORED if 'flags' is -/// not `O_CREAT` or `O_TMPFILE`) +/// @param flags Bitwise OR of flags defined in +/// @param mode Permissions for the newly-created file (IGNORED if 'flags' is +/// not `O_CREAT` or `O_TMPFILE`), subject to the current umask /// @return file descriptor, or negative `errno` on failure int os_open(const char* path, int flags, int mode) { uv_fs_t open_req; int r = uv_fs_open(uv_default_loop(), &open_req, path, flags, mode, NULL); uv_fs_req_cleanup(&open_req); - //`r` is the same as open_req.result, except when OOM. So just use `r`. + // r is the same as open_req.result (except for OOM: then only r is set). return r; } -- cgit