]> git.scottworley.com Git - tattlekey/commitdiff
client: Extract pending-send object as send_t
authorScott Worley <scottworley@scottworley.com>
Mon, 9 Oct 2023 20:35:11 +0000 (13:35 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 11 Oct 2023 01:48:52 +0000 (18:48 -0700)
client/tattlekey.c

index a11e6c192899b4343ca0b9d16e5a3956d69077c9..78d1dcfd8925c576b362d6fa0d20e09f7686de54 100644 (file)
@@ -7,6 +7,12 @@
 #include "config.h"
 #include "net.h"
 
+typedef struct {
+  uint32_t timestamp;
+  u16_t seq;
+  u8_t send_count;
+} send_t;
+
 enum event_type { BUTTONPRESS, SEND };
 typedef struct {
   enum event_type type;
@@ -14,11 +20,7 @@ typedef struct {
     struct {
       uint32_t timestamp;
     } buttonpress;
-    struct {
-      uint32_t timestamp;
-      u16_t seq;
-      u8_t send_count;
-    } send;
+    send_t send;
   };
 } event_t;