From 9f915a92c799be0097f3376d799ddbdbc5a03912 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Fri, 15 Apr 2016 17:27:20 +0000 Subject: [PATCH] ddb: for pointers replace 0 with NULL. Mostly cosmetical, no functional change. Found with devel/coccinelle. --- sys/ddb/db_command.c | 4 ++-- sys/ddb/db_sym.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 0d4f28f8b656..4f66498f5fbc 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -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. */ diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index ffcba7928476..25ae4bcaa973 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -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; }