OSDN Git Service
(root)
/
nkf
/
nkf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0e5bf4
)
eliminate needless branch condition
author
Urabe, Shyouhei
<shyouhei@ruby-lang.org>
Tue, 22 Mar 2016 11:12:37 +0000
(20:12 +0900)
committer
Urabe, Shyouhei
<shyouhei@ruby-lang.org>
Tue, 22 Mar 2016 11:12:37 +0000
(20:12 +0900)
We already see `if (fold_preserve_f) {` before those lines, so reaching
here indicates `fold_preserve_f` is always false.
nkf.c
patch
|
blob
|
history
diff --git
a/nkf.c
b/nkf.c
index
6cdb026
..
8d3d798
100644
(file)
--- a/
nkf.c
+++ b/
nkf.c
@@
-3834,8
+3834,8
@@
fold_conv(nkf_char c2, nkf_char c1)
f_prev = c1;
f_line = 0;
fold_state = CR;
- } else if ((f_prev == c1
&& !fold_preserve_f
)
- || (f_prev == LF
&& fold_preserve_f
)
+ } else if ((f_prev == c1)
+ || (f_prev == LF)
) { /* duplicate newline */
if (f_line) {
f_line = 0;