Mercurial > vim
comparison src/cmdexpand.c @ 20751:d9a2e5dcfd9f v8.2.0928
patch 8.2.0928: many type casts are used for vim_strnsave()
Commit: https://github.com/vim/vim/commit/df44a27b53586fccfc6a3aedc89061fdd9a515ff
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 7 20:49:05 2020 +0200
patch 8.2.0928: many type casts are used for vim_strnsave()
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Jun 2020 21:00:03 +0200 |
parents | 49673325ca13 |
children | a0b147774bd4 |
comparison
equal
deleted
inserted
replaced
20750:020a100bfa92 | 20751:d9a2e5dcfd9f |
---|---|
2553 | 2553 |
2554 if (!skip) | 2554 if (!skip) |
2555 { | 2555 { |
2556 if (ga_grow(&ga, 1) == FAIL) | 2556 if (ga_grow(&ga, 1) == FAIL) |
2557 break; | 2557 break; |
2558 ((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(s, (int)(e - s)); | 2558 ((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(s, e - s); |
2559 ++ga.ga_len; | 2559 ++ga.ga_len; |
2560 } | 2560 } |
2561 | 2561 |
2562 if (*e != NUL) | 2562 if (*e != NUL) |
2563 ++e; | 2563 ++e; |