diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-04 01:27:47 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-04 01:27:47 +0000 |
commit | 0f4c96ac1d778b84b93ac87c9e1c24ae1e04a0b1 (patch) | |
tree | 4f9f4694b6d804f3b77af7bb17dd3f66390ef33e /sys/ddb/db_examine.c | |
parent | f64107dbfe03774caedb4c9c3487212149baefca (diff) |
Make compile on OpenBSD/alpha. MD stuff is still missing though.
Diffstat (limited to 'sys/ddb/db_examine.c')
-rw-r--r-- | sys/ddb/db_examine.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index cca67eea3f6..539686d7e43 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_examine.c,v 1.4 1996/04/21 22:18:59 deraadt Exp $ */ +/* $OpenBSD: db_examine.c,v 1.5 1996/08/04 01:27:45 niklas Exp $ */ /* $NetBSD: db_examine.c,v 1.11 1996/03/30 22:30:07 christos Exp $ */ /* @@ -262,7 +262,7 @@ db_search_cmd(daddr, have_addr, dcount, modif) int size; db_expr_t value; db_expr_t mask; - unsigned int count; + db_expr_t count; t = db_read_token(); if (t == tSLASH) { @@ -312,7 +312,7 @@ db_search_cmd(daddr, have_addr, dcount, modif) } } else { db_unread_token(t); - count = -1; /* effectively forever */ + count = -1; /* forever */ } db_skip_to_eol(); @@ -326,9 +326,10 @@ db_search(addr, size, value, mask, count) int size; db_expr_t value; db_expr_t mask; - unsigned int count; + db_expr_t count; { - while (count-- != 0) { + /* Negative counts means forever. */ + while (count < 0 || count-- != 0) { db_prev = addr; if ((db_get_value(addr, size, FALSE) & mask) == value) break; |