diff options
author | Jim Blandy <jimb@codesourcery.com> | 2002-05-14 21:31:05 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2002-05-14 21:31:05 +0000 |
commit | a86bc61c350fe9cd7f8c31d3807277a06a594a85 (patch) | |
tree | bf6fc0107f9ff8a32d780c36462d336a6aa1c228 /gdb/macroexp.c | |
parent | 7f367f013527c0c9b8de7c58c7f829f3a18375c0 (diff) | |
download | gdb-a86bc61c350fe9cd7f8c31d3807277a06a594a85.zip gdb-a86bc61c350fe9cd7f8c31d3807277a06a594a85.tar.gz gdb-a86bc61c350fe9cd7f8c31d3807277a06a594a85.tar.bz2 |
* macroexp.c (init_buffer, gather_arguments, expand): Use NULL, not 0.
* macrotab.c (macro_lookup_inclusion, find_definition,
new_macro_table): Same.
* macroexp.c (currently_rescanning, expand): Use `strcmp () == 0',
not `! strcmp ()'. This is a dubious improvement.
* macrotab.c (macro_lookup_inclusion, find_definition): Same.
* macrotab.c (macro_lookup_inclusion): Initialize `best_depth',
although it's not necessary, to avoid a warning.
Diffstat (limited to 'gdb/macroexp.c')
-rw-r--r-- | gdb/macroexp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/macroexp.c b/gdb/macroexp.c index cb97f42..061c63a 100644 --- a/gdb/macroexp.c +++ b/gdb/macroexp.c @@ -88,7 +88,7 @@ init_buffer (struct macro_buffer *b, int n) if (n > 0) b->text = (char *) xmalloc (n); else - b->text = 0; + b->text = NULL; b->len = 0; b->shared = 0; b->last_token = -1; @@ -646,7 +646,7 @@ static int currently_rescanning (struct macro_name_list *list, const char *name) { for (; list; list = list->next) - if (! strcmp (name, list->name)) + if (strcmp (name, list->name) == 0) return 1; return 0; @@ -692,7 +692,7 @@ gather_arguments (const char *name, struct macro_buffer *src, int *argc_p) { struct macro_buffer tok; int args_len, args_size; - struct macro_buffer *args = 0; + struct macro_buffer *args = NULL; struct cleanup *back_to = make_cleanup (free_current_contents, &args); /* Does SRC start with an opening paren token? Read from a copy of @@ -928,12 +928,12 @@ expand (const char *id, { struct cleanup *back_to = make_cleanup (null_cleanup, 0); int argc; - struct macro_buffer *argv = 0; + struct macro_buffer *argv = NULL; struct macro_buffer substituted; struct macro_buffer substituted_src; if (def->argc >= 1 - && ! strcmp (def->argv[def->argc - 1], "...")) + && strcmp (def->argv[def->argc - 1], "...") == 0) error ("Varargs macros not implemented yet."); make_cleanup (free_current_contents, &argv); |