diff options
author | Keith Packard <keithp@keithp.com> | 2019-02-04 22:33:32 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2019-02-18 13:08:23 -0800 |
commit | f26197f0eec650330b476514c47978b4ba087719 (patch) | |
tree | 4602d80d2a43a66850810d43712308550b038ab7 /src | |
parent | 54dd2a6e3a05b940d9daebb3d73f6876c182b3e7 (diff) |
altos: Stop doing pointer arith on void *
Switch to uint8_t * instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/ao_storage.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/kernel/ao_storage.c b/src/kernel/ao_storage.c index 132431e2..cfd116f9 100644 --- a/src/kernel/ao_storage.c +++ b/src/kernel/ao_storage.c @@ -20,11 +20,9 @@ #include <ao_storage.h> uint8_t -ao_storage_read(ao_pos_t pos, void *buf, uint16_t len) +ao_storage_read(ao_pos_t pos, void *v_buf, uint16_t len) { -#ifdef CC1111 - return ao_storage_device_read(pos, buf, len); -#else + uint8_t *buf = v_buf; uint16_t this_len; uint16_t this_off; @@ -50,15 +48,12 @@ ao_storage_read(ao_pos_t pos, void *buf, uint16_t len) pos += this_len; } return 1; -#endif } uint8_t -ao_storage_write(ao_pos_t pos, void *buf, uint16_t len) +ao_storage_write(ao_pos_t pos, void *v_buf, uint16_t len) { -#ifdef CC1111 - return ao_storage_device_write(pos, buf, len); -#else + uint8_t *buf = v_buf; uint16_t this_len; uint16_t this_off; @@ -84,7 +79,6 @@ ao_storage_write(ao_pos_t pos, void *buf, uint16_t len) pos += this_len; } return 1; -#endif } static uint8_t storage_data[128]; |