aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/mgmt-misc.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-15 21:34:00 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-15 21:34:00 -0400
commit5af4a915edf3e77705fa2625081200b61f8dda26 (patch)
tree46d8e3cc6e27627e9f3e78c5a0b4a3573d1b1de3 /projects/cli-test/mgmt-misc.c
parentb159bf0bb24a99c7d3ff1b3855f840add63198e5 (diff)
Cleanup: All drivers return HAL_StatusTypeDef rather than magic values.
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
Diffstat (limited to 'projects/cli-test/mgmt-misc.c')
-rw-r--r--projects/cli-test/mgmt-misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/projects/cli-test/mgmt-misc.c b/projects/cli-test/mgmt-misc.c
index 4be9a4b..1216bd5 100644
--- a/projects/cli-test/mgmt-misc.c
+++ b/projects/cli-test/mgmt-misc.c
@@ -49,9 +49,9 @@
static volatile hal_crc32_t demo_crc;
-static int _count_bytes_callback(uint8_t *buf, size_t len) {
+static HAL_StatusTypeDef _count_bytes_callback(uint8_t *buf, size_t len) {
demo_crc = hal_crc32_update(demo_crc, buf, len);
- return 1;
+ return CMSIS_HAL_OK;
}
int cli_receive_data(struct cli_def *cli, uint8_t *buf, size_t len, cli_data_callback data_callback)
@@ -92,7 +92,7 @@ int cli_receive_data(struct cli_def *cli, uint8_t *buf, size_t len, cli_data_cal
/* After reception of a chunk but before ACKing we have "all" the time in the world to
* calculate CRC and invoke the data_callback.
*/
- if (data_callback != NULL && ! data_callback(buf, (size_t) n)) {
+ if (data_callback != NULL && data_callback(buf, n) != CMSIS_HAL_OK) {
cli_print(cli, "Data processing failed");
goto fail;
}