diff mbox series

[hurd,commited,3/6] allocalim.h: Fix codestyle

Message ID 20180129220048.28097-4-samuel.thibault@ens-lyon.org
State New
Headers show
Series hurd: fixes against previous hurd commits | expand

Commit Message

Samuel Thibault Jan. 29, 2018, 10 p.m. UTC
* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
	|| to respect codestyle.
---
 ChangeLog                   | 2 ++
 sysdeps/pthread/allocalim.h | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

Comments

Adhemerval Zanella Netto Jan. 30, 2018, 7:23 p.m. UTC | #1
On 29/01/2018 20:00, Samuel Thibault wrote:
> 	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
> 	|| to respect codestyle.
> ---
>  ChangeLog                   | 2 ++
>  sysdeps/pthread/allocalim.h | 6 +++---
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 873646e685..476cb73847 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -13,6 +13,8 @@
>  	* sysdeps/mach/hurd/i386/libresolv.abilist: New file.
>  	* sysdeps/mach/hurd/i386/librt.abilist: New file.
>  	* sysdeps/mach/hurd/i386/libutil.abilist: New file.
> +	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
> +	|| to respect codestyle.
>  
>  2018-01-29  Darius Rad  <darius@bluespec.com>
>  
> diff --git a/sysdeps/pthread/allocalim.h b/sysdeps/pthread/allocalim.h
> index fdae0c251f..38faf57b70 100644
> --- a/sysdeps/pthread/allocalim.h
> +++ b/sysdeps/pthread/allocalim.h
> @@ -24,9 +24,9 @@ extern __always_inline
>  int
>  __libc_use_alloca (size_t size)
>  {
> -  return (
> +  return (__builtin_expect (__libc_alloca_cutoff (size), 1)
>  #ifdef PTHREAD_STACK_MIN
> -          __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) ||
> +          || __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1)
>  #endif
> -          __builtin_expect (__libc_alloca_cutoff (size), 1));
> +	  );
>  }
> 

Since you are touching it, you may use __glibc_likely instead.
diff mbox series

Patch

diff --git a/ChangeLog b/ChangeLog
index 873646e685..476cb73847 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,8 @@ 
 	* sysdeps/mach/hurd/i386/libresolv.abilist: New file.
 	* sysdeps/mach/hurd/i386/librt.abilist: New file.
 	* sysdeps/mach/hurd/i386/libutil.abilist: New file.
+	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
+	|| to respect codestyle.
 
 2018-01-29  Darius Rad  <darius@bluespec.com>
 
diff --git a/sysdeps/pthread/allocalim.h b/sysdeps/pthread/allocalim.h
index fdae0c251f..38faf57b70 100644
--- a/sysdeps/pthread/allocalim.h
+++ b/sysdeps/pthread/allocalim.h
@@ -24,9 +24,9 @@  extern __always_inline
 int
 __libc_use_alloca (size_t size)
 {
-  return (
+  return (__builtin_expect (__libc_alloca_cutoff (size), 1)
 #ifdef PTHREAD_STACK_MIN
-          __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) ||
+          || __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1)
 #endif
-          __builtin_expect (__libc_alloca_cutoff (size), 1));
+	  );
 }