summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_expr.c
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-06-25 15:59:24 +0000
committertmm <tmm@FreeBSD.org>2002-06-25 15:59:24 +0000
commitb6591e77a03a2acf50546d7c67b6f901f8bb8917 (patch)
tree4d6977f3a048ee8e56ea149de36b759c69d81766 /sys/ddb/db_expr.c
parente17570ea7d6e727fc62d68f48173e24f2babbb46 (diff)
downloadFreeBSD-src-b6591e77a03a2acf50546d7c67b6f901f8bb8917.zip
FreeBSD-src-b6591e77a03a2acf50546d7c67b6f901f8bb8917.tar.gz
Don't assume that pointers are 4 bytes or sizeof(int) in size. This fixes
the indirection operator ('*') and address examination ('x/a') on big-endian platoforms for which the above is not true, as well as on little-endian platforms if the cut-off bits are not 0.
Diffstat (limited to 'sys/ddb/db_expr.c')
-rw-r--r--sys/ddb/db_expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c
index 850121b..eb627e7 100644
--- a/sys/ddb/db_expr.c
+++ b/sys/ddb/db_expr.c
@@ -119,7 +119,7 @@ db_unary(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(void *), FALSE);
return (TRUE);
}
db_unread_token(t);
OpenPOWER on IntegriCloud