]> granicus.if.org Git - nethack/commitdiff
formatting bit
authorPatR <rankin@nethack.org>
Thu, 9 Dec 2021 00:24:48 +0000 (16:24 -0800)
committerPatR <rankin@nethack.org>
Thu, 9 Dec 2021 00:24:48 +0000 (16:24 -0800)
src/cmd.c

index 521b42b5ef690c117f2e36756bc3303ce6364ae2..5d3397fafb50a0cb66bc22babfcc8351211116c2 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -229,7 +229,7 @@ set_occupation(int (*fn)(void), const char *txt, int xtime)
 void
 cmdq_add_ec(int (*fn)(void))
 {
-    struct _cmd_queue *tmp = (struct _cmd_queue *)alloc(sizeof(struct _cmd_queue));
+    struct _cmd_queue *tmp = (struct _cmd_queue *) alloc(sizeof *tmp);
     struct _cmd_queue *cq = g.command_queue;
 
     tmp->typ = CMDQ_EXTCMD;
@@ -249,7 +249,7 @@ cmdq_add_ec(int (*fn)(void))
 void
 cmdq_add_key(char key)
 {
-    struct _cmd_queue *tmp = (struct _cmd_queue *)alloc(sizeof(struct _cmd_queue));
+    struct _cmd_queue *tmp = (struct _cmd_queue *) alloc(sizeof *tmp);
     struct _cmd_queue *cq = g.command_queue;
 
     tmp->typ = CMDQ_KEY;
@@ -1960,7 +1960,8 @@ struct ext_func_tab extcmdlist[] = {
     { 'q',    "quaff", "quaff (drink) something",
               dodrink, 0, NULL },
     { '\0', "quit", "exit without saving current game",
-              done2, IFBURIED | AUTOCOMPLETE | GENERALCMD | NOFUZZERCMD, NULL },
+              done2, IFBURIED | AUTOCOMPLETE | GENERALCMD | NOFUZZERCMD,
+              NULL },
     { 'Q',    "quiver", "select ammunition for quiver",
               dowieldquiver, 0, NULL },
     { 'r',    "read", "read a scroll or spellbook",