Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/string If we have to cast, do it properly.
details: https://anonhg.NetBSD.org/src/rev/a8b9893abcbe
branches: trunk
changeset: 771587:a8b9893abcbe
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Nov 25 17:48:22 2011 +0000
description:
If we have to cast, do it properly.
diffstat:
lib/libc/string/wcscspn_bloom.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r 301a2dc2fb7d -r a8b9893abcbe lib/libc/string/wcscspn_bloom.h
--- a/lib/libc/string/wcscspn_bloom.h Fri Nov 25 16:55:05 2011 +0000
+++ b/lib/libc/string/wcscspn_bloom.h Fri Nov 25 17:48:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wcscspn_bloom.h,v 1.3 2011/11/25 16:46:56 dholland Exp $ */
+/* $NetBSD: wcscspn_bloom.h,v 1.4 2011/11/25 17:48:22 joerg Exp $ */
/*-
* Copyright (c) 2011 Joerg Sonnenberger,
@@ -64,9 +64,9 @@
memset(bloom, 0, BLOOM_SIZE);
do {
val = wcscspn_bloom1((size_t)*charset);
- bloom[val / BLOOM_DIV] |= (size_t)(1ULL << (val % BLOOM_DIV));
+ bloom[val / BLOOM_DIV] |= (size_t)1 << (val % BLOOM_DIV);
val = wcscspn_bloom2((size_t)*charset);
- bloom[val / BLOOM_DIV] |= (size_t)(1ULL << (val % BLOOM_DIV));
+ bloom[val / BLOOM_DIV] |= (size_t)1 << (val % BLOOM_DIV);
}
while (*++charset);
}
@@ -77,10 +77,10 @@
size_t val;
val = wcscspn_bloom1((size_t)ch);
- if (bloom[val / BLOOM_DIV] & (1ULL << (val % BLOOM_DIV)))
+ if (bloom[val / BLOOM_DIV] & ((size_t)1 << (val % BLOOM_DIV)))
return 1;
val = wcscspn_bloom2((size_t)ch);
- if (bloom[val / BLOOM_DIV] & (1ULL << (val % BLOOM_DIV)))
+ if (bloom[val / BLOOM_DIV] & ((size_t)1 << (val % BLOOM_DIV)))
return 1;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index