aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-05-25 20:31:14 +0200
committerGitHub <noreply@github.com>2022-05-25 12:31:14 -0600
commit9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e (patch)
tree83e044109d61242150b8c98897e179416025f576 /src/nvim/msgpack_rpc
parent8c4e62351f67dd6a44f67f3a2b6f3a3551acf475 (diff)
downloadrneovim-9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e.tar.gz
rneovim-9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e.tar.bz2
rneovim-9fec6dc9a25b5cf9c9a444ac2bd0728e8af3229e.zip
refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)
Diffstat (limited to 'src/nvim/msgpack_rpc')
-rw-r--r--src/nvim/msgpack_rpc/channel.c5
-rw-r--r--src/nvim/msgpack_rpc/channel.h1
-rw-r--r--src/nvim/msgpack_rpc/helpers.c2
3 files changed, 0 insertions, 8 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 48ecd5d0ea..79ecd9f827 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -49,7 +49,6 @@ void rpc_init(void)
msgpack_sbuffer_init(&out_buffer);
}
-
void rpc_start(Channel *channel)
{
channel_incref(channel);
@@ -73,7 +72,6 @@ void rpc_start(Channel *channel)
}
}
-
static Channel *find_rpc_channel(uint64_t id)
{
Channel *chan = find_channel(id);
@@ -359,7 +357,6 @@ static void handle_request(Channel *channel, msgpack_object *request)
}
}
-
/// Handles a message, depending on the type:
/// - Request: invokes method and writes the response (or error).
/// - Notification: invokes method (emits `nvim_error_event` on error).
@@ -413,7 +410,6 @@ static bool channel_write(Channel *channel, WBuffer *buffer)
success = wstream_write(in, buffer);
}
-
if (!success) {
// If the write failed for any reason, close the channel
char buf[256];
@@ -535,7 +531,6 @@ static void unsubscribe(Channel *channel, char *event)
xfree(event_string);
}
-
/// Mark rpc state as closed, and release its reference to the channel.
/// Don't call this directly, call channel_close(id, kChannelPartRpc, &error)
void rpc_close(Channel *channel)
diff --git a/src/nvim/msgpack_rpc/channel.h b/src/nvim/msgpack_rpc/channel.h
index eb0de47437..ac7911bb2c 100644
--- a/src/nvim/msgpack_rpc/channel.h
+++ b/src/nvim/msgpack_rpc/channel.h
@@ -17,7 +17,6 @@
/// of os_inchar(), so they are processed "just-in-time".
EXTERN MultiQueue *ch_before_blocking_events INIT(= NULL);
-
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "msgpack_rpc/channel.h.generated.h"
#endif
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c
index 32014fcf2b..488321be42 100644
--- a/src/nvim/msgpack_rpc/helpers.c
+++ b/src/nvim/msgpack_rpc/helpers.c
@@ -22,7 +22,6 @@
static msgpack_zone zone;
static msgpack_sbuffer sbuffer;
-
void msgpack_rpc_helpers_init(void)
{
msgpack_zone_init(&zone, 0xfff);
@@ -252,7 +251,6 @@ bool msgpack_rpc_to_dictionary(const msgpack_object *const obj, Dictionary *cons
arg->size = obj->via.array.size;
arg->items = xcalloc(obj->via.map.size, sizeof(KeyValuePair));
-
for (uint32_t i = 0; i < obj->via.map.size; i++) {
if (!msgpack_rpc_to_string(&obj->via.map.ptr[i].key,
&arg->items[i].key)) {