From: Scott Worley Date: Tue, 10 Oct 2023 08:34:01 +0000 (-0700) Subject: client: lint nits X-Git-Tag: v0.1.0~27 X-Git-Url: http://git.scottworley.com/tattlekey/commitdiff_plain/8c76d103da962e8c973f16df51c2e6bbacd00d3a?hp=e8a53974ae88e0bbe0d616be7d53aa060b4ed80d client: lint nits --- diff --git a/client/press.c b/client/press.c index 6c46ae9..b9f01ef 100644 --- a/client/press.c +++ b/client/press.c @@ -28,7 +28,7 @@ press_pile_t *create_press_pile() { press_pile_t *pp = (press_pile_t *)xcalloc(1, sizeof(press_pile_t)); pp->presses = (queue_t *)xcalloc(config_resend_count, sizeof(queue_t)); pp->sleeps = (queue_t **)xcalloc(config_resend_count, sizeof(queue_t *)); - for (int i = 0; i < config_resend_count; i++) { + for (uint i = 0; i < config_resend_count; i++) { const uint paranoid_safety_fudge = 10; uint element_count = paranoid_safety_fudge + (1 << i); element_count = MAX(element_count, config_minimum_queue_size); @@ -43,7 +43,7 @@ press_pile_t *create_press_pile() { } void add_press(press_pile_t *pp, press_t *press) { - int sc = press->send_count; + u16_t sc = press->send_count; if (sc >= config_resend_count) signal_error_by_blinking(); bool was_empty = queue_is_empty(&pp->presses[sc]); diff --git a/client/tattlekey.c b/client/tattlekey.c index 9f28e45..c4e745f 100644 --- a/client/tattlekey.c +++ b/client/tattlekey.c @@ -60,7 +60,6 @@ void set_resend_alarm(int alarm, uint32_t now, uint32_t next_act_time) { if (hardware_alarm_set_target(alarm, make_timeout_time_ms(sleep_duration * 1000))) signal_error_by_blinking(); - return; } void service_sleeps(int alarm, press_pile_t *pp) {