aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-04 02:29:17 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-01-04 02:29:17 +0100
commita1e97b18f1c90fb85683bd09b597511cdf14a34e (patch)
treead9215ed02e536ebea7f163b700eddc1caf27bd0 /src
parent8586770e1fd83ea42bec22ae0fd6a961159cac3e (diff)
downloadrneovim-a1e97b18f1c90fb85683bd09b597511cdf14a34e.tar.gz
rneovim-a1e97b18f1c90fb85683bd09b597511cdf14a34e.tar.bz2
rneovim-a1e97b18f1c90fb85683bd09b597511cdf14a34e.zip
PVS/V547: diff.c: Expression is always true
Diffstat (limited to 'src')
-rw-r--r--src/nvim/diff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index c4e011d5d1..0209c8251a 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1565,7 +1565,8 @@ static void diff_read(int idx_orig, int idx_new, diffout_T *dout)
&lnum_new, &count_new) == FAIL) {
continue;
}
- } else if (diffstyle == DIFF_UNIFIED) {
+ } else {
+ assert(diffstyle == DIFF_UNIFIED);
if (STRNCMP(line, "@@ ", 3) != 0) {
continue; // not the start of a diff block
}
@@ -1573,9 +1574,6 @@ static void diff_read(int idx_orig, int idx_new, diffout_T *dout)
&lnum_new, &count_new) == FAIL) {
continue;
}
- } else {
- EMSG(_("E959: Invalid diff format."));
- break;
}
// Go over blocks before the change, for which orig and new are equal.