Module Name: src
Committed By: maya
Date: Mon Jun 11 20:28:23 UTC 2018
Modified Files:
src/lib/libc/citrus/modules: citrus_mapper_std.c
Log Message:
Avoid left-shifting a negative number in the non-compat case, too.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/citrus/modules/citrus_mapper_std.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/citrus/modules/citrus_mapper_std.c
diff -u src/lib/libc/citrus/modules/citrus_mapper_std.c:1.11 src/lib/libc/citrus/modules/citrus_mapper_std.c:1.12
--- src/lib/libc/citrus/modules/citrus_mapper_std.c:1.11 Mon Jun 11 18:03:38 2018
+++ src/lib/libc/citrus/modules/citrus_mapper_std.c Mon Jun 11 20:28:23 2018
@@ -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 @@ rowcol_parse_variable(struct _citrus_map
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;