[hurd,commited] hurd: Fix _NOFLSH value

Message ID 20230115195645.2428598-1-samuel.thibault@ens-lyon.org
State Committed, archived
Headers
Series [hurd,commited] hurd: Fix _NOFLSH value |

Checks

Context Check Description
dj/TryBot-apply_patch fail Patch failed to apply to master at the time it was sent
dj/TryBot-32bit fail Patch series failed to apply

Commit Message

Samuel Thibault Jan. 15, 2023, 7:56 p.m. UTC
  shifting 1 (thus an integer) left 31 bit is undefined behavior. We have to
make it an unsigned integer to properly get 0x80000000 (like done in other
places).
---
 bits/termios.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Philippe Mathieu-Daudé Jan. 16, 2023, 8:36 a.m. UTC | #1
On 15/1/23 20:56, Samuel Thibault wrote:
> shifting 1 (thus an integer) left 31 bit is undefined behavior. We have to
> make it an unsigned integer to properly get 0x80000000 (like done in other
> places).
> ---
>   bits/termios.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  

Patch

diff --git a/bits/termios.h b/bits/termios.h
index ae62d00853..4439c2f14e 100644
--- a/bits/termios.h
+++ b/bits/termios.h
@@ -246,7 +246,7 @@  struct termios
 # define NOKERNINFO (1 << 25)	/* Disable VSTATUS.  */
 # define PENDIN	(1 << 29)	/* Retype pending input (state).  */
 #endif
-#define	_NOFLSH	(1 << 31)	/* Disable flush after interrupt.  */
+#define	_NOFLSH	(1U << 31)	/* Disable flush after interrupt.  */
 #define	NOFLSH	_NOFLSH
 
   /* Control characters.  */