This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [BZ #19654] Added tests for *_finite aliases from libmvec


On Fri, 3 Jun 2016, Andrew Senkevich wrote:

> +  return (test_finite_alias ());

Don't use redundant parentheses around return value (the only case they 
are appropriate in a return statement is if the value wraps onto multiple 
lines and so they ensure correct indentation).  This line with this 
problem appears twice in the patch.

> +int
> +test_finite_alias (void)
> +{
> +  int i;
> +
> +  init_arg ();
> +
> +  if (arch_check)
> +  {
> +    return (77);
> +  }

Likewise, and avoid redundant {} around single-statement if-body.

> +  if (log_res[0] != 0.0) return (1);
> +  if (exp_res[0] != 1.0) return (1);
> +  if (pow_res[0] != 1.0) return (1);

Again, avoid redundant parentheses.

OK with those changes.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]