]> git.scottworley.com Git - tattlekey/blobdiff - client/tattlekey.c
client: Extract pending-send object as send_t
[tattlekey] / 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;