aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-08-31 21:19:49 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-09-04 16:49:54 +0100
commitbe9033582599e50521feb879d7476756c2c8c017 (patch)
tree5dbfd6d2c54c2b04bed8146aa5dc873e4b109044 /gdb/c-valprint.c
parent02f024f9a527012938e978c233fef39f439a5013 (diff)
gdb: Remove casts of NULL during assignment.
In the following code: struct symbol *wsym = (struct symbol *) NULL; the cast of NULL is redundant, it adds noise, and is just one more thing to change if the type of wsym ever changes. There are a relatively small number of places in gdb where the above code pattern is used. Usually the cast is removed like this: struct symbol *wsym = NULL; This commit updates all the places within the gdb/ directory where we cast NULL during assignment, removing the cast. gdb/ChangeLog: * c-valprint.c (print_unpacked_pointer): Remove cast of NULL pointer. * dbxread.c (dbx_end_psymtab): Likewise. * gnu-nat.c (gnu_write_inferior): Likewise. * mdebugread.c (cross_ref): Likewise. * p-valprint.c (pascal_val_print): Likewise. * xcoffread.c (xcoff_end_psymtab): Likewise.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r--gdb/c-valprint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 80a75d79db..9c96df2002 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -193,9 +193,9 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
if (vt_address && options->vtblprint)
{
struct value *vt_val;
- struct symbol *wsym = (struct symbol *) NULL;
+ struct symbol *wsym = NULL;
struct type *wtype;
- struct block *block = (struct block *) NULL;
+ struct block *block = NULL;
struct field_of_this_result is_this_fld;
if (want_space)