[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/9] Avoid code redundancy in lib/buildcmd.c.
From: |
James Youngman |
Subject: |
[PATCH 7/9] Avoid code redundancy in lib/buildcmd.c. |
Date: |
Sat, 4 Jun 2011 01:21:51 +0100 |
* lib/buildcmd.c (bc_get_arg_max): Recheck val only if we might
have changed it (i.e. when ARG_MAX is defined).
---
ChangeLog | 4 ++++
lib/buildcmd.c | 3 +--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3ff1060..4b87214 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-06-03 James Youngman <address@hidden>
+ 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 c663375..4a021f8 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.
--
1.7.2.5
- [PATCH 1/9] Don't display a separate gnulib version., James Youngman, 2011/06/03
- [PATCH 2/9] Fix some compiler warnings in findutils-version.c., James Youngman, 2011/06/03
- [PATCH 4/9] Fix compiler warnings in lib/fdleak.c, James Youngman, 2011/06/03
- [PATCH 5/9] Fix a compiler warning in lib/buildcmd.c, James Youngman, 2011/06/03
- [PATCH 9/9] Compiler warning fixes in find/pred.c., James Youngman, 2011/06/03
- [PATCH 7/9] Avoid code redundancy in lib/buildcmd.c.,
James Youngman <=
- [PATCH 8/9] Eliminate some compiler warnings in parser.c, James Youngman, 2011/06/03
- [PATCH 6/9] Eliminate some compiler warnings in find/parser.c., James Youngman, 2011/06/03
- [PATCH 3/9] Fix several small compiler warnings., James Youngman, 2011/06/03