Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/mdocml/dist avoid arraycount for toolz
details: https://anonhg.NetBSD.org/src/rev/15e419b4fa0f
branches: trunk
changeset: 785597:15e419b4fa0f
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 22 12:31:25 2013 +0000
description:
avoid arraycount for toolz
diffstat:
external/bsd/mdocml/dist/roff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 9b56fc8df9ee -r 15e419b4fa0f external/bsd/mdocml/dist/roff.c
--- a/external/bsd/mdocml/dist/roff.c Fri Mar 22 10:52:20 2013 +0000
+++ b/external/bsd/mdocml/dist/roff.c Fri Mar 22 12:31:25 2013 +0000
@@ -1267,7 +1267,7 @@
hash_find(struct roff *r, const char *str, uint32_t *h)
{
struct roff_nr *e;
- *h = hash_str(str) % __arraycount(r->nr);
+ *h = hash_str(str) % (sizeof(r->nr) / sizeof(r->nr[0]));
for (e = r->nr[*h]; e; e = e->next)
if (e->hash == *h && strcmp(e->str, str) == 0)
Home |
Main Index |
Thread Index |
Old Index