aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/fileio.h4
-rw-r--r--src/nvim/os/time.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/os/fileio.h b/src/nvim/os/fileio.h
index 426dc422c2..da23a54c4e 100644
--- a/src/nvim/os/fileio.h
+++ b/src/nvim/os/fileio.h
@@ -37,7 +37,7 @@ typedef enum {
///< EAGAIN was encountered.
} FileOpenFlags;
-static inline bool file_eof(const FileDescriptor *const fp)
+static inline bool file_eof(const FileDescriptor *fp)
REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_NONNULL_ALL;
/// Check whether end of file was encountered
@@ -51,7 +51,7 @@ static inline bool file_eof(const FileDescriptor *const fp)
return fp->eof && rbuffer_size(fp->rv) == 0;
}
-static inline int file_fd(const FileDescriptor *const fp)
+static inline int file_fd(const FileDescriptor *fp)
REAL_FATTR_PURE REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_NONNULL_ALL;
/// Return the file descriptor associated with the FileDescriptor structure
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c
index 396bf6986a..161c8d28b8 100644
--- a/src/nvim/os/time.c
+++ b/src/nvim/os/time.c
@@ -67,7 +67,7 @@ void os_delay(uint64_t ms, bool ignoreinput)
}
LOOP_PROCESS_EVENTS_UNTIL(&main_loop, NULL, (int)ms, got_int);
} else {
- os_microdelay(ms * 1000u, ignoreinput);
+ os_microdelay(ms * 1000U, ignoreinput);
}
}
@@ -80,10 +80,10 @@ void os_delay(uint64_t ms, bool ignoreinput)
/// If false, waiting is aborted on any input.
void os_microdelay(uint64_t us, bool ignoreinput)
{
- uint64_t elapsed = 0u;
+ uint64_t elapsed = 0U;
uint64_t base = uv_hrtime();
// Convert microseconds to nanoseconds, or UINT64_MAX on overflow.
- const uint64_t ns = (us < UINT64_MAX / 1000u) ? us * 1000u : UINT64_MAX;
+ const uint64_t ns = (us < UINT64_MAX / 1000U) ? us * 1000U : UINT64_MAX;
uv_mutex_lock(&delay_mutex);
@@ -92,7 +92,7 @@ void os_microdelay(uint64_t us, bool ignoreinput)
// Else we check for input in ~100ms intervals.
const uint64_t ns_delta = ignoreinput
? ns - elapsed
- : MIN(ns - elapsed, 100000000u); // 100ms
+ : MIN(ns - elapsed, 100000000U); // 100ms
const int rv = uv_cond_timedwait(&delay_cond, &delay_mutex, ns_delta);
if (0 != rv && UV_ETIMEDOUT != rv) {