diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-08-31 21:19:49 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-09-04 16:49:54 +0100 |
commit | be9033582599e50521feb879d7476756c2c8c017 (patch) | |
tree | 5dbfd6d2c54c2b04bed8146aa5dc873e4b109044 /gdb/gnu-nat.c | |
parent | 02f024f9a527012938e978c233fef39f439a5013 (diff) | |
download | gdb-be9033582599e50521feb879d7476756c2c8c017.zip gdb-be9033582599e50521feb879d7476756c2c8c017.tar.gz gdb-be9033582599e50521feb879d7476756c2c8c017.tar.bz2 |
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/gnu-nat.c')
-rw-r--r-- | gdb/gnu-nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index c2dfe5d..d3f54d0 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2350,7 +2350,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *errstr = "Bug in gnu_write_inferior"; struct vm_region_list *region_element; - struct vm_region_list *region_head = (struct vm_region_list *) NULL; + struct vm_region_list *region_head = NULL; /* Get memory from inferior with page aligned addresses. */ err = vm_read (task, |