summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-07 20:49:05 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-07 20:49:05 +0200
commitdf44a27b53586fccfc6a3aedc89061fdd9a515ff (patch)
tree2d0ca2790b3e106a7d8f059951160789167a17a1 /src/channel.c
parentda84ac2a6f467d0b9eddcc8709433cda75d16a41 (diff)
downloadvim-git-df44a27b53586fccfc6a3aedc89061fdd9a515ff.tar.gz
patch 8.2.0928: many type casts are used for vim_strnsave()v8.2.0928
Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes #5633) Remove some type casts.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channel.c b/src/channel.c
index d11b148a8..740329f10 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2906,7 +2906,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
{
// Copy the message into allocated memory (excluding the NL)
// and remove it from the buffer (including the NL).
- msg = vim_strnsave(buf, (int)(nl - buf));
+ msg = vim_strnsave(buf, nl - buf);
channel_consume(channel, part, (int)(nl - buf) + 1);
}
}
@@ -3703,7 +3703,7 @@ channel_read_block(
{
// Copy the message into allocated memory and remove it from the
// buffer.
- msg = vim_strnsave(buf, (int)(nl - buf));
+ msg = vim_strnsave(buf, nl - buf);
channel_consume(channel, part, (int)(nl - buf) + 1);
}
}