aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-15 09:30:05 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:44 -0700
commit9b1440374cbe716ac5dab4d3092e67089db36fa5 (patch)
tree69d4f42360a6854902b29a7871d5e0859a3abff6 /gdb
parent555bbdeb943f17e908e8066aba836705637c0cfb (diff)
downloadgdb-9b1440374cbe716ac5dab4d3092e67089db36fa5.zip
gdb-9b1440374cbe716ac5dab4d3092e67089db36fa5.tar.gz
gdb-9b1440374cbe716ac5dab4d3092e67089db36fa5.tar.bz2
pass NULL to TARGET_DEFAULT_RETURN when appropriate
This changes instances of TARGET_DEFAULT_RETURN(0) to TARGET_DEFAULT_RETURN(NULL) when appropriate. The use of "0" was a relic from an earlier implementation of make-target-delegates; and I didn't want to go back through the long patch series, fixing up conflicts, just to change this small detail. 2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.h (struct target_ops) <to_extra_thread_info, to_thread_name, to_pid_to_exec_file, to_get_section_table, to_memory_map, to_read_description, to_traceframe_info>: Use NULL, not 0, in TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/target-delegates.c14
-rw-r--r--gdb/target.h14
3 files changed, 22 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0dd90ca..7496e3b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target-delegates.c: Rebuild.
+ * target.h (struct target_ops) <to_extra_thread_info,
+ to_thread_name, to_pid_to_exec_file, to_get_section_table,
+ to_memory_map, to_read_description, to_traceframe_info>: Use NULL,
+ not 0, in TARGET_DEFAULT_RETURN.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* target.c (complete_target_initialization): Remove casts. Use
return_zero_has_execution.
(return_zero): Add "ignore" argument.
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 4585d25..15ab43a 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -609,7 +609,7 @@ delegate_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
static char *
tdefault_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
{
- return 0;
+ return NULL;
}
static char *
@@ -622,7 +622,7 @@ delegate_thread_name (struct target_ops *self, struct thread_info *arg1)
static char *
tdefault_thread_name (struct target_ops *self, struct thread_info *arg1)
{
- return 0;
+ return NULL;
}
static void
@@ -654,7 +654,7 @@ delegate_pid_to_exec_file (struct target_ops *self, int arg1)
static char *
tdefault_pid_to_exec_file (struct target_ops *self, int arg1)
{
- return 0;
+ return NULL;
}
static void
@@ -679,7 +679,7 @@ delegate_get_section_table (struct target_ops *self)
static struct target_section_table *
tdefault_get_section_table (struct target_ops *self)
{
- return 0;
+ return NULL;
}
static int
@@ -772,7 +772,7 @@ delegate_memory_map (struct target_ops *self)
static VEC(mem_region_s) *
tdefault_memory_map (struct target_ops *self)
{
- return 0;
+ return NULL;
}
static void
@@ -811,7 +811,7 @@ delegate_read_description (struct target_ops *self)
static const struct target_desc *
tdefault_read_description (struct target_ops *self)
{
- return 0;
+ return NULL;
}
static ptid_t
@@ -1297,7 +1297,7 @@ delegate_traceframe_info (struct target_ops *self)
static struct traceframe_info *
tdefault_traceframe_info (struct target_ops *self)
{
- return 0;
+ return NULL;
}
static int
diff --git a/gdb/target.h b/gdb/target.h
index 34539c1..79805d1 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -567,20 +567,20 @@ struct target_ops
char *(*to_pid_to_str) (struct target_ops *, ptid_t)
TARGET_DEFAULT_FUNC (default_pid_to_str);
char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
char *(*to_thread_name) (struct target_ops *, struct thread_info *)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
void (*to_stop) (struct target_ops *, ptid_t)
TARGET_DEFAULT_IGNORE ();
void (*to_rcmd) (struct target_ops *,
char *command, struct ui_file *output)
TARGET_DEFAULT_FUNC (default_rcmd);
char *(*to_pid_to_exec_file) (struct target_ops *, int pid)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
void (*to_log_command) (struct target_ops *, const char *)
TARGET_DEFAULT_IGNORE ();
struct target_section_table *(*to_get_section_table) (struct target_ops *)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
enum strata to_stratum;
int (*to_has_all_memory) (struct target_ops *);
int (*to_has_memory) (struct target_ops *);
@@ -672,7 +672,7 @@ struct target_ops
change unexpectedly, it should be invalidated, and higher
layers will re-fetch it. */
VEC(mem_region_s) *(*to_memory_map) (struct target_ops *)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
/* Erases the region of flash memory starting at ADDRESS, of
length LENGTH.
@@ -695,7 +695,7 @@ struct target_ops
"beneath" target. Returns the description found, or NULL if no
description was available. */
const struct target_desc *(*to_read_description) (struct target_ops *ops)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
/* Build the PTID of the thread on which a given task is running,
based on LWP and THREAD. These values are extracted from the
@@ -987,7 +987,7 @@ struct target_ops
cache data; higher layers take care of caching, invalidating,
and re-fetching when necessary. */
struct traceframe_info *(*to_traceframe_info) (struct target_ops *)
- TARGET_DEFAULT_RETURN (0);
+ TARGET_DEFAULT_RETURN (NULL);
/* Ask the target to use or not to use agent according to USE. Return 1
successful, 0 otherwise. */