aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-16 10:59:11 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-20 19:57:09 +0100
commita6e3d93421ba13c407a96fac9cc01fa41ec7ad98 (patch)
treee84209969b11fe2f0dabcad00a271468b2199bc9 /src/nvim/os
parentec79ff893d5906e1f0d90953cffa535ffae47823 (diff)
downloadrneovim-a6e3d93421ba13c407a96fac9cc01fa41ec7ad98.tar.gz
rneovim-a6e3d93421ba13c407a96fac9cc01fa41ec7ad98.tar.bz2
rneovim-a6e3d93421ba13c407a96fac9cc01fa41ec7ad98.zip
refactor: enable formatting for ternaries
This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/dl.c2
-rw-r--r--src/nvim/os/users.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/dl.c b/src/nvim/os/dl.c
index 67164f56b4..1a8d847f79 100644
--- a/src/nvim/os/dl.c
+++ b/src/nvim/os/dl.c
@@ -72,7 +72,7 @@ bool os_libcall(const char *libname, const char *funcname, const char *argv, int
// assume that ptr values of NULL, 1 or -1 are illegal
*str_out = (res && (intptr_t)res != 1 && (intptr_t)res != -1)
- ? xstrdup(res) : NULL;
+ ? xstrdup(res) : NULL;
} else {
str_int_fn sfn = (str_int_fn)fn;
int_int_fn ifn = (int_int_fn)fn;
diff --git a/src/nvim/os/users.c b/src/nvim/os/users.c
index b61dcd1e4b..f0666435cc 100644
--- a/src/nvim/os/users.c
+++ b/src/nvim/os/users.c
@@ -27,7 +27,7 @@ static garray_T ga_users = GA_EMPTY_INIT_VALUE;
static void add_user(garray_T *users, char *user, bool need_copy)
{
char *user_copy = (user != NULL && need_copy)
- ? xstrdup(user) : user;
+ ? xstrdup(user) : user;
if (user_copy == NULL || *user_copy == NUL) {
if (need_copy) {