summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2011-06-03 09:47:45 +0100
committerJames Youngman <jay@gnu.org>2011-06-04 00:43:38 +0100
commit073e6424aeccd7efc065f6567b787b73c9a7b650 (patch)
tree7b3e7d89386d353fcbcca451eed4861348bb015f
parentec9afce2510d54824e5ba8819f42adb4b365b001 (diff)
downloadfindutils-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--ChangeLog4
-rw-r--r--lib/buildcmd.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ff1060a..4b872143 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.