diff options
author | Yao Qi <yao@codesourcery.com> | 2014-01-29 11:48:40 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-02-07 11:19:58 +0800 |
commit | ce6d08922f2875544f9ba461a849726ceff84528 (patch) | |
tree | 275b7ccc499426f17f5a3758ecfab5d10c4ade86 /bfd/cache.c | |
parent | 2ed4b5488f68c63da0713dc008ba8b688a742386 (diff) | |
download | gdb-ce6d08922f2875544f9ba461a849726ceff84528.zip gdb-ce6d08922f2875544f9ba461a849726ceff84528.tar.gz gdb-ce6d08922f2875544f9ba461a849726ceff84528.tar.bz2 |
Return early in target_xfer_partial when LEN is zero.
Nowadays, argument LEN of to_xfer_partial can be zero in some cases,
and each implementation may do nothing and return zero, indicating
transfer is done. That is fine. However, when we change
to_xfer_partial to return target_xfer_status, we have to check every
return value of most of to_xfer_partial implementations, return
TARGET_XFER_DONE if return value is zero.
This patch simplifies this by checking LEN in target_xfer_partial, and
return 0 if LEN is zero. Regression tested on x86_84-linux. Is it
OK?
gdb:
2014-02-07 Yao Qi <yao@codesourcery.com>
* target.c (target_xfer_partial): Return zero if LEN is zero.
Diffstat (limited to 'bfd/cache.c')
0 files changed, 0 insertions, 0 deletions