Mercurial > vim
comparison src/diff.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 | d571231175b4 |
children | 097f5b5c907b |
comparison
equal
deleted
inserted
replaced
20750:020a100bfa92 | 20751:d9a2e5dcfd9f |
---|---|
1299 else | 1299 else |
1300 { | 1300 { |
1301 if (curbuf->b_fname != NULL) | 1301 if (curbuf->b_fname != NULL) |
1302 { | 1302 { |
1303 newname = vim_strnsave(curbuf->b_fname, | 1303 newname = vim_strnsave(curbuf->b_fname, |
1304 (int)(STRLEN(curbuf->b_fname) + 4)); | 1304 STRLEN(curbuf->b_fname) + 4); |
1305 if (newname != NULL) | 1305 if (newname != NULL) |
1306 STRCAT(newname, ".new"); | 1306 STRCAT(newname, ".new"); |
1307 } | 1307 } |
1308 | 1308 |
1309 #ifdef FEAT_GUI | 1309 #ifdef FEAT_GUI |