]> git.scottworley.com Git - tattlekey/commitdiff
client: lint nits
authorScott Worley <scottworley@scottworley.com>
Tue, 10 Oct 2023 08:34:01 +0000 (01:34 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 11 Oct 2023 01:49:51 +0000 (18:49 -0700)
client/press.c
client/tattlekey.c

index 6c46ae9f6df5a584f54a7f3ddefc07bfc8ab3b30..b9f01ef1d4c4ddebb869eb3605cd73cfb9686806 100644 (file)
@@ -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 *));
   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);
     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) {
 }
 
 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]);
   if (sc >= config_resend_count)
     signal_error_by_blinking();
   bool was_empty = queue_is_empty(&pp->presses[sc]);
index 9f28e455ba9993cbf7a295ddc74e7d0ed69c87ab..c4e745fdccbd91d076be8b11c97b6e2c1659f1d7 100644 (file)
@@ -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();
   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) {
 }
 
 void service_sleeps(int alarm, press_pile_t *pp) {