aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_client.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-04-21 17:50:37 +0200
committerbfredl <bjorn.linse@gmail.com>2023-04-21 17:56:09 +0200
commit936b78e811a4264c914dbc4753f591b8a3a0f7ff (patch)
treedc49270c31a5ea31d6ec6ddac560a2175b3a458c /src/nvim/ui_client.c
parenta0adc51dacb766df12599b9846a64df955b55d50 (diff)
downloadrneovim-936b78e811a4264c914dbc4753f591b8a3a0f7ff.tar.gz
rneovim-936b78e811a4264c914dbc4753f591b8a3a0f7ff.tar.bz2
rneovim-936b78e811a4264c914dbc4753f591b8a3a0f7ff.zip
refactor: revert incorrect change to ui_client.c code
- There is no "resource leak". - "return 0" is definitely not the correct behavior if we ever occur a platform where this would fail. - There was no problem here to fix. so let's not "fix" it. - once CI is upgraded to gcc 13, we'll figure out the correct way to make it shut the fuck up. warnings on non-ci platforms are not critical.
Diffstat (limited to 'src/nvim/ui_client.c')
-rw-r--r--src/nvim/ui_client.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nvim/ui_client.c b/src/nvim/ui_client.c
index e177c0a60d..b93b31f7dc 100644
--- a/src/nvim/ui_client.c
+++ b/src/nvim/ui_client.c
@@ -65,11 +65,7 @@ uint64_t ui_client_start_server(int argc, char **argv)
#ifdef MSWIN
os_open_conin_fd();
#else
- int fd = dup(stderr_isatty ? STDERR_FILENO : STDOUT_FILENO);
- if (fd < 0) {
- return 0;
- }
- // FIXME: resource leak of fd
+ dup(stderr_isatty ? STDERR_FILENO : STDOUT_FILENO);
#endif
}