svn commit: r298073 - head/sys/ddb

Pedro F. Giffuni pfg at FreeBSD.org
Fri Apr 15 17:27:22 UTC 2016


Author: pfg
Date: Fri Apr 15 17:27:20 2016
New Revision: 298073
URL: https://svnweb.freebsd.org/changeset/base/298073

Log:
  ddb: for pointers replace 0 with NULL.
  
  Mostly cosmetical, no functional change.
  
  Found with devel/coccinelle.

Modified:
  head/sys/ddb/db_command.c
  head/sys/ddb/db_sym.c

Modified: head/sys/ddb/db_command.c
==============================================================================
--- head/sys/ddb/db_command.c	Fri Apr 15 16:36:17 2016	(r298072)
+++ head/sys/ddb/db_command.c	Fri Apr 15 17:27:20 2016	(r298073)
@@ -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, s
 	    }
 	}
 	*last_cmdp = cmd;
-	if (cmd != 0) {
+	if (cmd != NULL) {
 	    /*
 	     * Execute the command.
 	     */

Modified: head/sys/ddb/db_sym.c
==============================================================================
--- head/sys/ddb/db_sym.c	Fri Apr 15 16:36:17 2016	(r298072)
+++ head/sys/ddb/db_sym.c	Fri Apr 15 17:27:20 2016	(r298073)
@@ -395,7 +395,7 @@ db_symbol_values(c_db_sym_t sym, const c
 	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
 
 	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;
 	}


More information about the svn-src-head mailing list