summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriane van der Steldt <ariane@cvs.openbsd.org>2011-05-22 19:21:56 +0000
committerAriane van der Steldt <ariane@cvs.openbsd.org>2011-05-22 19:21:56 +0000
commit44ada67f788d5025a7d4dd7b214bafc618c7f982 (patch)
tree31ceb4152a5ef7d0fd63d9492e6df3f04979d16b
parentd2e1d44c76ce9d6996a092d68e68ff88033a7c77 (diff)
In ddb, when dereferencing a pointer, use sizeof a pointer.
Enables show map /f *kernel_map to succeed without nullpointer errors on 64-bit archs. ok miod@
-rw-r--r--sys/ddb/db_expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c
index 9549ea11623..2a94f70dcb4 100644
--- a/sys/ddb/db_expr.c
+++ b/sys/ddb/db_expr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_expr.c,v 1.8 2006/03/13 06:23:20 jsg Exp $ */
+/* $OpenBSD: db_expr.c,v 1.9 2011/05/22 19:21:55 ariane Exp $ */
/* $NetBSD: db_expr.c,v 1.5 1996/02/05 01:56:58 christos Exp $ */
/*
@@ -118,7 +118,7 @@ db_unary(db_expr_t *valuep)
db_error("Syntax error\n");
/*NOTREACHED*/
}
- *valuep = db_get_value((db_addr_t)*valuep, sizeof(int), FALSE);
+ *valuep = db_get_value((db_addr_t)*valuep, sizeof(db_addr_t), FALSE);
return (TRUE);
}
db_unread_token(t);