1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 18:19:00 +02:00

df: omit redundant comparison

Trivial inefficiency reported by Bruno Haible in:
http://lists.gnu.org/r/bug-gnulib/2018-07/msg00109.html
* src/df.c (hide_problematic_chars): Omit redundant test.
This commit is contained in:
Paul Eggert
2018-07-27 12:00:02 -07:00
parent 25c74a37ca
commit e5dae2c6b0
+1 -1
View File
@@ -288,7 +288,7 @@ hide_problematic_chars (char *cell)
wchar_t wc;
size_t srcbytes = srcend - src;
n = mbrtowc (&wc, src, srcbytes, &mbstate);
bool ok = 0 < n && n <= srcbytes;
bool ok = n <= srcbytes;
if (ok)
ok = !iswcntrl (wc);