diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-23 09:16:14 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-31 18:43:53 +0200 |
commit | 9948003da46c27b45d4479124407ed7805d84a02 (patch) | |
tree | 8eaca5b4873abd1b957b3cfe729b066b3ec9a60e /common/state/backend_bucket_circular.c | |
parent | b7d9863dae31d7d4d3d4a9d671c4595287243b98 (diff) | |
download | barebox-9948003da46c27b45d4479124407ed7805d84a02.tar.gz barebox-9948003da46c27b45d4479124407ed7805d84a02.tar.xz |
state: replace len_hint logic
The len_hint mechanism is rather hard to understand as it's not clear
from where to where the hint is passed and also it's not clear what
happens if the hint is empty or wrong.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_bucket_circular.c')
-rw-r--r-- | common/state/backend_bucket_circular.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c index 8eae86694a..0b8286f9cc 100644 --- a/common/state/backend_bucket_circular.c +++ b/common/state/backend_bucket_circular.c @@ -227,7 +227,7 @@ static int state_mtd_peb_erase(struct state_backend_storage_bucket_circular *cir static int state_backend_bucket_circular_read(struct state_backend_storage_bucket *bucket, uint8_t ** buf_out, - ssize_t * len_hint) + ssize_t * len_out) { struct state_backend_storage_bucket_circular *circ = get_bucket_circular(bucket); @@ -282,7 +282,7 @@ static int state_backend_bucket_circular_read(struct state_backend_storage_bucke } *buf_out = buf; - *len_hint = read_len - sizeof(struct state_backend_storage_bucket_circular_meta); + *len_out = read_len - sizeof(struct state_backend_storage_bucket_circular_meta); return ret; } |