aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/mgmt-cli.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-11 17:32:33 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-11 17:36:00 -0400
commit4026cce22d330d3b9c4b218dd2e19d4f60412e05 (patch)
tree7f04989c6905f6b80b4d5d3cfe65a430f6b6ed2c /projects/hsm/mgmt-cli.c
parentc746ed393aff2a86a1f53e636d2530559be53d6f (diff)
Cleanup: signed/unsigned mismatches, mostly in loop counters
Diffstat (limited to 'projects/hsm/mgmt-cli.c')
-rw-r--r--projects/hsm/mgmt-cli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/projects/hsm/mgmt-cli.c b/projects/hsm/mgmt-cli.c
index ec9bf8f..ab9cf44 100644
--- a/projects/hsm/mgmt-cli.c
+++ b/projects/hsm/mgmt-cli.c
@@ -64,8 +64,8 @@ static tcb_t *cli_task;
#endif
typedef struct {
- int ridx;
- volatile int widx;
+ unsigned ridx;
+ unsigned widx;
mgmt_cli_dma_state_t rx_state;
uint8_t buf[CLI_UART_RECVBUF_SIZE];
} ringbuf_t;
@@ -116,7 +116,7 @@ static void uart_cli_print(struct cli_def *cli __attribute__ ((unused)), const c
static ssize_t uart_cli_read(struct cli_def *cli __attribute__ ((unused)), void *buf, size_t count)
{
- for (int i = 0; i < count; ++i) {
+ for (size_t i = 0; i < count; ++i) {
while (ringbuf_read_char(&uart_ringbuf, (uint8_t *)(buf + i)) == 0)
task_sleep();
}