* [hurd,commited] hurd: Fix _NOFLSH value
@ 2023-01-15 19:56 Samuel Thibault
2023-01-16 8:36 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Thibault @ 2023-01-15 19:56 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
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(-)
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. */
--
2.39.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [hurd,commited] hurd: Fix _NOFLSH value
2023-01-15 19:56 [hurd,commited] hurd: Fix _NOFLSH value Samuel Thibault
@ 2023-01-16 8:36 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-16 8:36 UTC (permalink / raw)
To: Samuel Thibault, libc-alpha; +Cc: commit-hurd
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-16 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-15 19:56 [hurd,commited] hurd: Fix _NOFLSH value Samuel Thibault
2023-01-16 8:36 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).