* 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 <[email protected]> + 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
