aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-07-19 15:30:57 +0200
committerDundar Goc <gocdundar@gmail.com>2022-07-31 00:52:59 +0200
commit824a729628950d72834b98faf28d18b7a94eefb2 (patch)
treed8640bdac1d1e03e340787406328f45247c63509 /src/nvim/diff.c
parent9511faa819e8260aa7ae2c2ff140070bbc96efa9 (diff)
downloadrneovim-824a729628950d72834b98faf28d18b7a94eefb2.tar.gz
rneovim-824a729628950d72834b98faf28d18b7a94eefb2.tar.bz2
rneovim-824a729628950d72834b98faf28d18b7a94eefb2.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index f43eaaa299..4ad2591802 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -3066,8 +3066,8 @@ static int parse_diff_ed(char_u *line, diffhunk_T *hunk)
// change: {first}[,{last}]c{first}[,{last}]
// append: {first}a{first}[,{last}]
// delete: {first}[,{last}]d{first}
- char_u *p = line;
- linenr_T f1 = getdigits_int32((char **)&p, true, 0);
+ char *p = (char *)line;
+ linenr_T f1 = getdigits_int32(&p, true, 0);
if (*p == ',') {
p++;
l1 = getdigits(&p, true, 0);
@@ -3077,7 +3077,7 @@ static int parse_diff_ed(char_u *line, diffhunk_T *hunk)
if (*p != 'a' && *p != 'c' && *p != 'd') {
return FAIL; // invalid diff format
}
- int difftype = *p++;
+ int difftype = (uint8_t)(*p++);
long f2 = getdigits(&p, true, 0);
if (*p == ',') {
p++;
@@ -3114,7 +3114,7 @@ static int parse_diff_unified(char_u *line, diffhunk_T *hunk)
{
// Parse unified diff hunk header:
// @@ -oldline,oldcount +newline,newcount @@
- char_u *p = line;
+ char *p = (char *)line;
if (*p++ == '@' && *p++ == '@' && *p++ == ' ' && *p++ == '-') {
long oldcount;
long newline;