ddb: for pointers replace 0 with NULL.

Mostly cosmetical, no functional change.

Found with devel/coccinelle.
This commit is contained in:
Pedro F. Giffuni 2016-04-15 17:27:20 +00:00
parent 739f4ae3b1
commit 9f915a92c7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298073
2 changed files with 5 additions and 5 deletions

View File

@ -144,7 +144,7 @@ static struct command db_cmds[] = {
};
struct command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table);
static struct command *db_last_command = 0;
static struct command *db_last_command = NULL;
/*
* if 'ed' style: 'dot' is set at start of last item printed,
@ -429,7 +429,7 @@ db_command(struct command **last_cmdp, struct command_table *cmd_table,
}
}
*last_cmdp = cmd;
if (cmd != 0) {
if (cmd != NULL) {
/*
* Execute the command.
*/

View File

@ -395,7 +395,7 @@ db_symbol_values(c_db_sym_t sym, const char **namep, db_expr_t *valuep)
db_expr_t value;
if (sym == DB_SYM_NULL) {
*namep = 0;
*namep = NULL;
return;
}
@ -438,13 +438,13 @@ db_printsym(db_expr_t off, db_strategy_t strategy)
cursym = db_search_symbol(off, strategy, &d);
db_symbol_values(cursym, &name, &value);
if (name == 0)
if (name == NULL)
value = off;
if (value >= DB_SMALL_VALUE_MIN && value <= DB_SMALL_VALUE_MAX) {
db_printf("%+#lr", (long)off);
return;
}
if (name == 0 || d >= (unsigned long)db_maxoff) {
if (name == NULL || d >= (unsigned long)db_maxoff) {
db_printf("%#lr", (unsigned long)off);
return;
}