aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-02-23 12:24:08 +0800
committerYao Qi <yao@codesourcery.com>2014-02-24 11:27:37 +0800
commit5c328c057e963faacc50796c650a5feb06762c67 (patch)
tree8e9c4f388e27f1997f3e95558ed8700b9a0650d9 /gdb/target.c
parent605a662f6ad5841f77467727bad6611234f232cc (diff)
downloadgdb-5c328c057e963faacc50796c650a5feb06762c67.zip
gdb-5c328c057e963faacc50796c650a5feb06762c67.tar.gz
gdb-5c328c057e963faacc50796c650a5feb06762c67.tar.bz2
Remove TARGET_XFER_STATUS_ERROR_P
This patch removes macro TARGET_XFER_STATUS_ERROR_P, as Pedro pointed out during patches review that TARGET_XFER_STATUS_ERROR_P tends to be unnecessary. gdb: 2014-02-24 Yao Qi <yao@codesourcery.com> * target.h (TARGET_XFER_STATUS_ERROR_P): Remove. * corefile.c (read_memory): Adjusted. * target.c (target_write_with_progress): Adjusted.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 0f3bd30..60a11dd 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2002,12 +2002,9 @@ target_write_with_progress (struct target_ops *ops,
offset + xfered, len - xfered,
&xfered_len);
- if (status == TARGET_XFER_EOF)
- return xfered;
- if (TARGET_XFER_STATUS_ERROR_P (status))
- return -1;
+ if (status != TARGET_XFER_OK)
+ return status == TARGET_XFER_EOF ? xfered : -1;
- gdb_assert (status == TARGET_XFER_OK);
if (progress)
(*progress) (xfered_len, baton);