diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-23 19:53:49 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-08-23 19:53:49 +0000 |
commit | 07922c9f5b647c17940b05b0458ccce3a2615210 (patch) | |
tree | 0584affdb29d2add815766231ae590493a19b23f /sys/ddb/db_aout.c | |
parent | 1d4ff7b879bcc063d32171fe2564ed7c9edbc8db (diff) |
signedness pedanetery
Diffstat (limited to 'sys/ddb/db_aout.c')
-rw-r--r-- | sys/ddb/db_aout.c | 11 |
1 files changed, 6 insertions, 5 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) { |