summaryrefslogtreecommitdiffstats
path: root/common/state/backend_bucket_direct.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-23 10:07:00 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-31 18:43:53 +0200
commiteaf17f417739d35082875b971148edb5771bafb7 (patch)
treea87da96aedfd77dc2fcd649d4f1e00518bdf8415 /common/state/backend_bucket_direct.c
parent9948003da46c27b45d4479124407ed7805d84a02 (diff)
downloadbarebox-eaf17f417739d35082875b971148edb5771bafb7.tar.gz
state: Convert all bufs to void *
A void * is a much better type for a buffer than a u8 * as it can be casted to any other type implicitly. Convert all buffers used by the state framework to void *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_bucket_direct.c')
-rw-r--r--common/state/backend_bucket_direct.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
index 06a5433..246cb49 100644
--- a/common/state/backend_bucket_direct.c
+++ b/common/state/backend_bucket_direct.c
@@ -46,14 +46,14 @@ static inline struct state_backend_storage_bucket_direct
}
static int state_backend_bucket_direct_read(struct state_backend_storage_bucket
- *bucket, uint8_t ** buf_out,
+ *bucket, void ** buf_out,
ssize_t * len_out)
{
struct state_backend_storage_bucket_direct *direct =
get_bucket_direct(bucket);
struct state_backend_storage_bucket_direct_meta meta;
ssize_t read_len;
- uint8_t *buf;
+ void *buf;
int ret;
ret = lseek(direct->fd, direct->offset, SEEK_SET);
@@ -95,7 +95,7 @@ static int state_backend_bucket_direct_read(struct state_backend_storage_bucket
}
static int state_backend_bucket_direct_write(struct state_backend_storage_bucket
- *bucket, const uint8_t * buf,
+ *bucket, const void * buf,
ssize_t len)
{
struct state_backend_storage_bucket_direct *direct =