Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh PR bin/52348
details: https://anonhg.NetBSD.org/src/rev/fb1fa22fe958
branches: trunk
changeset: 355294:fb1fa22fe958
user: kre <kre%NetBSD.org@localhost>
date: Mon Jul 24 12:34:45 2017 +0000
description:
PR bin/52348
Silence nuisance testing environments - avoid << of a negative number
(a signed char -- in a hash function, the result is irrelevant, as long
as it is repeatable).
diffstat:
bin/sh/alias.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 9578fe0d6c08 -r fb1fa22fe958 bin/sh/alias.c
--- a/bin/sh/alias.c Mon Jul 24 10:34:54 2017 +0000
+++ b/bin/sh/alias.c Mon Jul 24 12:34:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alias.c,v 1.15 2014/06/18 18:17:30 christos Exp $ */
+/* $NetBSD: alias.c,v 1.16 2017/07/24 12:34:45 kre Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)alias.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: alias.c,v 1.15 2014/06/18 18:17:30 christos Exp $");
+__RCSID("$NetBSD: alias.c,v 1.16 2017/07/24 12:34:45 kre Exp $");
#endif
#endif /* not lint */
@@ -268,8 +268,8 @@
{
unsigned int hashval;
- hashval = *p << 4;
+ hashval = *(const unsigned char *)p << 4;
while (*p)
- hashval+= *p++;
+ hashval += *p++;
return &atab[hashval % ATABSIZE];
}
Home |
Main Index |
Thread Index |
Old Index