Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumphijack Avoid unportable bit shift semantics



details:   https://anonhg.NetBSD.org/src/rev/b1e2ed1e229a
branches:  trunk
changeset: 744671:b1e2ed1e229a
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Feb 10 09:10:58 2020 +0000

description:
Avoid unportable bit shift semantics

hijack.c:451:52, left shift of 1 by 31 places cannot be represented in type 'int

diffstat:

 lib/librumphijack/hijack.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 92d8d4bd6140 -r b1e2ed1e229a lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Mon Feb 10 07:48:02 2020 +0000
+++ b/lib/librumphijack/hijack.c        Mon Feb 10 09:10:58 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.128 2019/09/25 20:19:59 christos Exp $   */
+/*      $NetBSD: hijack.c,v 1.129 2020/02/10 09:10:58 kamil Exp $      */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include <rump/rumpuser_port.h>
 
 #if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.128 2019/09/25 20:19:59 christos Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.129 2020/02/10 09:10:58 kamil Exp $");
 #endif
 
 #include <sys/param.h>
@@ -440,7 +440,7 @@
 /* note: you cannot change this without editing the env-passing code */
 #define DUP2HIGH 2
 static uint32_t dup2vec[DUP2HIGH+1];
-#define DUP2BIT (1<<31)
+#define DUP2BIT (1U<<31)
 #define DUP2ALIAS (1<<30)
 #define DUP2FDMASK ((1<<30)-1)
 



Home | Main Index | Thread Index | Old Index