Mercurial > vim
comparison src/insexpand.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 | ce04ebdf26b8 |
comparison
equal
deleted
inserted
replaced
16767:3959544fc067 | 16768:695d9ef00b03 |
---|---|
609 // Remove any popup menu before changing the list of matches. | 609 // Remove any popup menu before changing the list of matches. |
610 ins_compl_del_pum(); | 610 ins_compl_del_pum(); |
611 | 611 |
612 // Allocate a new match structure. | 612 // Allocate a new match structure. |
613 // Copy the values to the new match structure. | 613 // Copy the values to the new match structure. |
614 match = (compl_T *)alloc_clear((unsigned)sizeof(compl_T)); | 614 match = (compl_T *)alloc_clear(sizeof(compl_T)); |
615 if (match == NULL) | 615 if (match == NULL) |
616 return FAIL; | 616 return FAIL; |
617 match->cp_number = -1; | 617 match->cp_number = -1; |
618 if (flags & CP_ORIGINAL_TEXT) | 618 if (flags & CP_ORIGINAL_TEXT) |
619 match->cp_number = 0; | 619 match->cp_number = 0; |
1069 compl = compl->cp_next; | 1069 compl = compl->cp_next; |
1070 } while (compl != NULL && compl != compl_first_match); | 1070 } while (compl != NULL && compl != compl_first_match); |
1071 if (compl_match_arraysize == 0) | 1071 if (compl_match_arraysize == 0) |
1072 return; | 1072 return; |
1073 compl_match_array = (pumitem_T *)alloc_clear( | 1073 compl_match_array = (pumitem_T *)alloc_clear( |
1074 (unsigned)(sizeof(pumitem_T) | 1074 sizeof(pumitem_T) * compl_match_arraysize); |
1075 * compl_match_arraysize)); | |
1076 if (compl_match_array != NULL) | 1075 if (compl_match_array != NULL) |
1077 { | 1076 { |
1078 // If the current match is the original text don't find the first | 1077 // If the current match is the original text don't find the first |
1079 // match after it, don't highlight anything. | 1078 // match after it, don't highlight anything. |
1080 if (compl_shown_match->cp_flags & CP_ORIGINAL_TEXT) | 1079 if (compl_shown_match->cp_flags & CP_ORIGINAL_TEXT) |