Mercurial > vim
comparison src/channel.c @ 16768:695d9ef00b03 v8.1.1386
patch 8.1.1386: unessesary type casts for lalloc()
commit https://github.com/vim/vim/commit/18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 24 19:39:03 2019 +0200
patch 8.1.1386: unessesary type casts for lalloc()
Problem: Unessesary type casts for lalloc().
Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 24 May 2019 19:45:05 +0200 |
parents | ef00b6bc186b |
children | fc58fee685e2 |
comparison
equal
deleted
inserted
replaced
16767:3959544fc067 | 16768:695d9ef00b03 |
---|---|
292 */ | 292 */ |
293 channel_T * | 293 channel_T * |
294 add_channel(void) | 294 add_channel(void) |
295 { | 295 { |
296 ch_part_T part; | 296 ch_part_T part; |
297 channel_T *channel = (channel_T *)alloc_clear((int)sizeof(channel_T)); | 297 channel_T *channel = (channel_T *)alloc_clear(sizeof(channel_T)); |
298 | 298 |
299 if (channel == NULL) | 299 if (channel == NULL) |
300 return NULL; | 300 return NULL; |
301 | 301 |
302 channel->ch_id = next_ch_id++; | 302 channel->ch_id = next_ch_id++; |
1726 char_u *p; | 1726 char_u *p; |
1727 | 1727 |
1728 // Concatenate everything into one buffer. | 1728 // Concatenate everything into one buffer. |
1729 for (node = head->rq_next; node != NULL; node = node->rq_next) | 1729 for (node = head->rq_next; node != NULL; node = node->rq_next) |
1730 len += node->rq_buflen; | 1730 len += node->rq_buflen; |
1731 res = lalloc(len + 1, TRUE); | 1731 res = alloc(len + 1); |
1732 if (res == NULL) | 1732 if (res == NULL) |
1733 return NULL; | 1733 return NULL; |
1734 p = res; | 1734 p = res; |
1735 for (node = head->rq_next; node != NULL; node = node->rq_next) | 1735 for (node = head->rq_next; node != NULL; node = node->rq_next) |
1736 { | 1736 { |