about summary refs log tree commit diff homepage
path: root/help.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-04-09 01:25:43 -0400
committerJune McEnroe <june@causal.agency>2018-04-09 01:25:43 -0400
commitd5d7c11a43941f51b7fcbc7614fc81fb6cc8d883 (patch)
treefb57f6052a242445f975536ff5c1ec60020074a5 /help.c
parentReplace #define with enum or const where possible (diff)
downloadtorus-d5d7c11a43941f51b7fcbc7614fc81fb6cc8d883.tar.gz
torus-d5d7c11a43941f51b7fcbc7614fc81fb6cc8d883.zip
Use anonymous union
Diffstat (limited to '')
-rw-r--r--help.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/help.c b/help.c
index f82cd5d..da73527 100644
--- a/help.c
+++ b/help.c
@@ -33,7 +33,7 @@ static void clientMessage(struct ClientMessage msg) {
 static void clientMove(int8_t dx, int8_t dy) {
     struct ClientMessage msg = {
         .type = CLIENT_MOVE,
-        .data.m = { .dx = dx, .dy = dy },
+        .move = { .dx = dx, .dy = dy },
     };
     clientMessage(msg);
 }
@@ -41,7 +41,7 @@ static void clientMove(int8_t dx, int8_t dy) {
 static void clientPut(uint8_t color, char cell) {
     struct ClientMessage msg = {
         .type = CLIENT_PUT,
-        .data.p = { .color = color, .cell = cell },
+        .put = { .color = color, .cell = cell },
     };
     clientMessage(msg);
 }