diff options
author | Yao Qi <yao@codesourcery.com> | 2014-02-23 12:24:08 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-02-24 11:27:37 +0800 |
commit | 5c328c057e963faacc50796c650a5feb06762c67 (patch) | |
tree | 8e9c4f388e27f1997f3e95558ed8700b9a0650d9 /gdb/target.c | |
parent | 605a662f6ad5841f77467727bad6611234f232cc (diff) | |
download | gdb-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.c | 7 |
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); |