bug#23714: [PATCH 3/6] grep: correct a stale comment and remove dead code

2016-06-06 Thread Zev Weiss
* src/grep.c (grepdesc): The `grep()' function no longer has special-case negative return values, since it no longer handles directories, so don't bother checking for them. --- src/grep.c | 61 +++-- 1 file changed, 27 insertions(+), 34 delet

bug#23717: [PATCH 6/6] grep: do pagesize initialization and buffer allocation earlier

2016-06-06 Thread Zev Weiss
* src/grep.c (reset, main): We're going to need pagesize and buffer initialized anyway, so we might as well do so unconditionally early on rather than checking on every call to reset(). --- src/grep.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/grep.c

bug#23715: [PATCH 4/6] grep: convert list_files to an enum

2016-06-06 Thread Zev Weiss
* src/grep.c: Make list_files a tristate enum instead of an int. --- src/grep.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/grep.c b/src/grep.c index 4fa56cf..eadc2be 100644 --- a/src/grep.c +++ b/src/grep.c @@ -929,6 +929,14 @@ static enum WI

bug#23716: [PATCH 5/6] grep: remove unnecessary dirdesc variable.

2016-06-06 Thread Zev Weiss
* src/grep.c (grepdirent): Remove dirdesc variable and just use fts_cwd_fd directly, since the fts_options test was guaranteed to succeed (and fts_cwd_fd was already being used directly in fstatat() anyway). --- src/grep.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sr

bug#23713: [PATCH 2/6] maint: replace bitwise with logical OR

2016-06-06 Thread Zev Weiss
* src/grep.c (main): replace bitwise ORs with logical ORs where it makes sense (when dealing with boolean conditions as opposed to bitmasks). --- src/grep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grep.c b/src/grep.c index d812bae..9776507 100644 --- a/src/grep.

bug#23712: [PATCH 1/6] maint: mark a couple of static variables const

2016-06-06 Thread Zev Weiss
* src/dfa.c (parse_bracket_exp): mark zeroclass const. * src/dfasearch.c: mark patterns0 const. --- src/dfa.c | 2 +- src/dfasearch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dfa.c b/src/dfa.c index 4e47b39..19363ce 100644 --- a/src/dfa.c +++ b/src/dfa.c @@

bug#23711: [PATCH 0/6] Miscellaneous Small Cleanup Patches

2016-06-06 Thread Zev Weiss
Hello, This patch series consists of a handful of minor cleanups and such that got mixed in with my multithreading patches, but which aren't particularly tied to the multithreading effort. I figured I'd split them out and send them along as a separate set, since they should be easy to review and