summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-11-26 20:33:07 +0000
committerderaadt <deraadt@openbsd.org>2013-11-26 20:33:07 +0000
commit61e87b287a539c46ee129ad6d615d9c8e7dcd1ae (patch)
tree1aa0db7f8edc860bdbbc773c17a2f55063404fd4 /lib
parent/etc/nsd.conf -> /var/nsd/etc/nsd.conf (diff)
downloadwireguard-openbsd-61e87b287a539c46ee129ad6d615d9c8e7dcd1ae.tar.xz
wireguard-openbsd-61e87b287a539c46ee129ad6d615d9c8e7dcd1ae.zip
1 << 31 cleanup. Eitan Adler pointed out that there has been a
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/arch/sparc64/fpu/fpu_div.c6
-rw-r--r--lib/libc/arch/sparc64/fpu/fpu_sqrt.c10
-rw-r--r--lib/libc/rpc/xdr_rec.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/arch/sparc64/fpu/fpu_div.c b/lib/libc/arch/sparc64/fpu/fpu_div.c
index 46573a9eac2..197ac15b1bd 100644
--- a/lib/libc/arch/sparc64/fpu/fpu_div.c
+++ b/lib/libc/arch/sparc64/fpu/fpu_div.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_div.c,v 1.2 2012/12/05 23:19:59 deraadt Exp $ */
+/* $OpenBSD: fpu_div.c,v 1.3 2013/11/26 20:33:07 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -139,7 +139,7 @@ __FBSDID("$FreeBSD: src/lib/libc/sparc64/fpu/fpu_div.c,v 1.3 2002/03/22 21:52:58
* } while ((bit >>= 1) != 0);
* Q[0] = q;
* for (i = 1; i < 4; i++) {
- * q = 0, bit = 1 << 31;
+ * q = 0, bit = 1U << 31;
* do {
* D = R - Y;
* if (D >= 0) {
@@ -238,7 +238,7 @@ __fpu_div(fe)
#define WORD(r, i) /* calculate r->fp_mant[i] */ \
q = 0; \
- bit = 1 << 31; \
+ bit = 1U << 31; \
LOOP; \
(x)->fp_mant[i] = q
diff --git a/lib/libc/arch/sparc64/fpu/fpu_sqrt.c b/lib/libc/arch/sparc64/fpu/fpu_sqrt.c
index bc493af5a87..be0e9d57ea8 100644
--- a/lib/libc/arch/sparc64/fpu/fpu_sqrt.c
+++ b/lib/libc/arch/sparc64/fpu/fpu_sqrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_sqrt.c,v 1.2 2012/12/05 23:19:59 deraadt Exp $ */
+/* $OpenBSD: fpu_sqrt.c,v 1.3 2013/11/26 20:33:07 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -263,7 +263,7 @@ __fpu_sqrt(fe)
* double x correctly while doing the `known q=1.0'.
*
* We do this one mantissa-word at a time, as noted above, to
- * save work. To avoid `(1 << 31) << 1', we also do the top bit
+ * save work. To avoid `(1U << 31) << 1', we also do the top bit
* outside of each per-word loop.
*
* The calculation `t = y + bit' breaks down into `t0 = y0, ...,
@@ -301,7 +301,7 @@ __fpu_sqrt(fe)
#define t1 tt
q = 0;
y1 = 0;
- bit = 1 << 31;
+ bit = 1U << 31;
EVEN_DOUBLE;
t1 = bit;
FPU_SUBS(d1, x1, t1);
@@ -332,7 +332,7 @@ __fpu_sqrt(fe)
#define t2 tt
q = 0;
y2 = 0;
- bit = 1 << 31;
+ bit = 1U << 31;
EVEN_DOUBLE;
t2 = bit;
FPU_SUBS(d2, x2, t2);
@@ -365,7 +365,7 @@ __fpu_sqrt(fe)
#define t3 tt
q = 0;
y3 = 0;
- bit = 1 << 31;
+ bit = 1U << 31;
EVEN_DOUBLE;
t3 = bit;
FPU_SUBS(d3, x3, t3);
diff --git a/lib/libc/rpc/xdr_rec.c b/lib/libc/rpc/xdr_rec.c
index da3d41838bd..e280c1d697c 100644
--- a/lib/libc/rpc/xdr_rec.c
+++ b/lib/libc/rpc/xdr_rec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xdr_rec.c,v 1.16 2013/04/17 17:40:35 tedu Exp $ */
+/* $OpenBSD: xdr_rec.c,v 1.17 2013/11/26 20:33:08 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -95,7 +95,7 @@ static struct xdr_ops xdrrec_ops = {
* meet the needs of xdr and rpc based on tcp.
*/
-#define LAST_FRAG ((u_int32_t)(1 << 31))
+#define LAST_FRAG ((u_int32_t)(1U << 31))
typedef struct rec_strm {
caddr_t tcp_handle;