summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-15 17:27:20 +0000
committerpfg <pfg@FreeBSD.org>2016-04-15 17:27:20 +0000
commitf58ccf2c15f5c42109bf228bb4e6c8978d332512 (patch)
treee1b5b88205b16cf423ee55dd927366e3066ace90 /sys/ddb
parent417ecd5e08a7ffc0b7b11cabef9c77290c7aeaa2 (diff)
downloadFreeBSD-src-f58ccf2c15f5c42109bf228bb4e6c8978d332512.zip
FreeBSD-src-f58ccf2c15f5c42109bf228bb4e6c8978d332512.tar.gz
ddb: for pointers replace 0 with NULL.
Mostly cosmetical, no functional change. Found with devel/coccinelle.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_command.c4
-rw-r--r--sys/ddb/db_sym.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 0d4f28f..4f66498 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 ffcba79..25ae4bc 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;
}
OpenPOWER on IntegriCloud