From 21d44ab115ba399ea06dcd47c71960332885e48c Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 26 Jun 2014 15:32:01 -0300 Subject: channel: Refactor channel_from_job to return the channel id --- src/nvim/os/channel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/os/channel.c b/src/nvim/os/channel.c index ae33ca31a3..a57fb9ea9e 100644 --- a/src/nvim/os/channel.c +++ b/src/nvim/os/channel.c @@ -81,7 +81,8 @@ void channel_teardown(void) /// stdin/stdout. stderr is forwarded to the editor error stream. /// /// @param argv The argument vector for the process -bool channel_from_job(char **argv) +/// @return The channel id +uint64_t channel_from_job(char **argv) { Channel *channel = register_channel(); channel->is_job = true; @@ -98,10 +99,10 @@ bool channel_from_job(char **argv) if (status <= 0) { close_channel(channel); - return false; + return 0; } - return true; + return channel->id; } /// Creates an API channel from a libuv stream representing a tcp or -- cgit