Avoid left-shifting a negative number in the non-compat case, too.
This commit is contained in:
parent
70ed068d8b
commit
9616ec28db
@ -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_mapper_std_rowcol *rc,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user