diff options
author | James Youngman <jay@gnu.org> | 2011-06-03 09:47:45 +0100 |
---|---|---|
committer | James Youngman <jay@gnu.org> | 2011-06-04 00:43:38 +0100 |
commit | 073e6424aeccd7efc065f6567b787b73c9a7b650 (patch) | |
tree | 7b3e7d89386d353fcbcca451eed4861348bb015f | |
parent | ec9afce2510d54824e5ba8819f42adb4b365b001 (diff) | |
download | findutils-073e6424aeccd7efc065f6567b787b73c9a7b650.tar.gz |
Avoid code redundancy in lib/buildcmd.c.
* lib/buildcmd.c (bc_get_arg_max): Recheck val only if we might
have changed it (i.e. when ARG_MAX is defined).
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/buildcmd.c | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,9 @@ 2011-06-03 James Youngman <jay@gnu.org> + Avoid code redundancy in lib/buildcmd.c. + * lib/buildcmd.c (bc_get_arg_max): Recheck val only if we might + have changed it (i.e. when ARG_MAX is defined). + Eliminate some compiler warnings in find/parser.c. * find/defs.h (struct parser_table): Make parser_name field const. * find/parser.c: Remove redundant declaration of parse_print. diff --git a/lib/buildcmd.c b/lib/buildcmd.c index c6633756..4a021f8e 100644 --- a/lib/buildcmd.c +++ b/lib/buildcmd.c @@ -458,10 +458,9 @@ bc_get_arg_max (void) */ #ifdef ARG_MAX val = ARG_MAX; -#endif - if (val > 0) return val; +#endif /* The value returned by this function bounds the * value applied as the ceiling for the -s option. |