diff options
author | June McEnroe <june@causal.agency> | 2018-04-09 01:25:43 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-04-09 01:25:43 -0400 |
commit | 6dadef0381d8b7a63f40b185b3592f27b55453cd (patch) | |
tree | ca6784a44b5154af2f707b5a213b0b5b796cd29d /help.c | |
parent | Replace #define with enum or const where possible (diff) | |
download | torus-6dadef0381d8b7a63f40b185b3592f27b55453cd.tar.gz torus-6dadef0381d8b7a63f40b185b3592f27b55453cd.zip |
Use anonymous union
Diffstat (limited to 'help.c')
-rw-r--r-- | help.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/help.c b/help.c index d997bde..8d45c83 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); } |