Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/citrus/modules Avoid left-shifting a negative numbe...
details: https://anonhg.NetBSD.org/src/rev/35061c92fe0e
branches: trunk
changeset: 362457:35061c92fe0e
user: maya <maya%NetBSD.org@localhost>
date: Mon Jun 11 20:28:23 2018 +0000
description:
Avoid left-shifting a negative number in the non-compat case, too.
diffstat:
lib/libc/citrus/modules/citrus_mapper_std.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6b9b61db031a -r 35061c92fe0e lib/libc/citrus/modules/citrus_mapper_std.c
--- a/lib/libc/citrus/modules/citrus_mapper_std.c Mon Jun 11 19:54:39 2018 +0000
+++ b/lib/libc/citrus/modules/citrus_mapper_std.c Mon Jun 11 20:28:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_mapper_std.c,v 1.11 2018/06/11 18:03:38 kamil Exp $ */
+/* $NetBSD: citrus_mapper_std.c,v 1.12 2018/06/11 20:28:23 maya Exp $ */
/*-
* Copyright (c)2003, 2006 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_mapper_std.c,v 1.11 2018/06/11 18:03:38 kamil Exp $");
+__RCSID("$NetBSD: citrus_mapper_std.c,v 1.12 2018/06/11 20:28:23 maya Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -216,7 +216,7 @@
rc->rc_dst_unit_bits = be32toh(rcx->rcx_dst_unit_bits);
m = be32toh(rcx->rcx_src_rowcol_bits);
- n = 1 << (m - 1);
+ n = 1U << (m - 1);
n |= n - 1;
rc->rc_src_rowcol_bits = m;
rc->rc_src_rowcol_mask = n;
Home |
Main Index |
Thread Index |
Old Index