summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-08-23 19:53:49 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-08-23 19:53:49 +0000
commit07922c9f5b647c17940b05b0458ccce3a2615210 (patch)
tree0584affdb29d2add815766231ae590493a19b23f
parent1d4ff7b879bcc063d32171fe2564ed7c9edbc8db (diff)
signedness pedanetery
-rw-r--r--sys/ddb/db_aout.c11
-rw-r--r--sys/ddb/db_sym.c6
2 files changed, 9 insertions, 8 deletions
diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c
index 7cbbb7d88cf..6fd9ea3a03d 100644
--- a/sys/ddb/db_aout.c
+++ b/sys/ddb/db_aout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_aout.c,v 1.10 1996/08/16 10:12:35 mickey Exp $ */
+/* $OpenBSD: db_aout.c,v 1.11 1996/08/23 19:53:46 niklas Exp $ */
/* $NetBSD: db_aout.c,v 1.14 1996/02/27 20:54:43 gwr Exp $ */
/*
@@ -199,7 +199,7 @@ X_db_search_symbol(symtab, off, strategy, diffp)
if ((sp->n_type & N_STAB) != 0 || (sp->n_type & N_TYPE) == N_FN)
continue;
if (off >= sp->n_value) {
- if (off - sp->n_value < diff || diff < 0) {
+ if ((db_expr_t)(off - sp->n_value) < diff || diff < 0) {
diff = off - sp->n_value;
symp = sp;
if (diff == 0 &&
@@ -209,7 +209,7 @@ X_db_search_symbol(symtab, off, strategy, diffp)
(sp->n_type & N_EXT))))
break;
}
- else if (off - sp->n_value == diff) {
+ else if ((db_expr_t)(off - sp->n_value) == diff) {
if (symp == 0)
symp = sp;
else if ((symp->n_type & N_EXT) == 0 &&
@@ -283,7 +283,8 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
}
if (sp->n_type == N_SO) {
- if (sp->n_value <= off && (off - sp->n_value) < sodiff) {
+ if ((db_expr_t)sp->n_value <= off &&
+ (off - sp->n_value) < sodiff) {
sodiff = off - sp->n_value;
fname = sp->n_un.n_name;
}
@@ -293,7 +294,7 @@ X_db_line_at_pc(symtab, cursym, filename, linenum, off)
if (sp->n_type != N_SLINE)
continue;
- if (sp->n_value > off)
+ if ((db_expr_t)sp->n_value > off)
break;
if (off - sp->n_value < lndiff) {
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c
index b3b9b619baa..935ea8b09a1 100644
--- a/sys/ddb/db_sym.c
+++ b/sys/ddb/db_sym.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_sym.c,v 1.15 1996/08/16 10:12:37 mickey Exp $ */
+/* $OpenBSD: db_sym.c,v 1.16 1996/08/23 19:53:48 niklas Exp $ */
/* $NetBSD: db_sym.c,v 1.12 1996/02/05 01:57:15 christos Exp $ */
/*
@@ -338,7 +338,7 @@ db_symbol_values(sym, namep, valuep)
* add support for symbols in loadable driver modules.
*/
extern char end[];
-unsigned long db_lastsym = (unsigned long)end;
+u_long db_lastsym = (u_long)end;
db_expr_t db_maxoff = 0x10000000;
@@ -354,7 +354,7 @@ db_printsym(off, strategy)
int linenum;
db_sym_t cursym;
- if (off <= db_lastsym) {
+ if ((u_long)off <= db_lastsym) {
cursym = db_search_symbol(off, strategy, &d);
db_symbol_values(cursym, &name, &value);
if (name && (d < db_maxoff) && value) {