Simplify SPDX copyright lines to the shortest canonical form...
[open-adventure.git] / cheat.c
diff --git a/cheat.c b/cheat.c
index df9ab5b9af03b0c501e24282969fdaee2d1976ea..279bcd9e6fc8dddabc8cb6eea798251026dd55e9 100644 (file)
--- a/cheat.c
+++ b/cheat.c
@@ -4,9 +4,8 @@
  * savefile(), so we know we're always outputting save files that advent
  * can import.
  *
- * Copyright (c) 1977, 2005 by Will Crowther and Don Woods
- * Copyright (c) 2017 by Eric S. Raymond
- * SPDX-License-Identifier: BSD-2-clause
+ * SPDX-FileCopyrightText: (C) 1977, 2005 by Will Crowther and Don Woods
+ * SPDX-License-Identifier: BSD-2-Clause
  */
 #include <getopt.h>
 #include <stdlib.h>
@@ -19,7 +18,6 @@ int main(int argc, char *argv[])
 {
     int ch;
     char *savefilename = NULL;
-    int version = 0;
     FILE *fp = NULL;
 
     // Initialize game variables
@@ -59,8 +57,8 @@ int main(int argc, char *argv[])
             printf("cheat: game.turns = %d\n", game.turns);
             break;
         case 'v':
-            version = atoi(optarg);
-            printf("cheat: version = %d\n", version);
+            save.version = atoi(optarg);
+            printf("cheat: version = %d\n", save.version);
             break;
         case 'o':
             savefilename = optarg;
@@ -89,7 +87,7 @@ int main(int argc, char *argv[])
         exit(EXIT_FAILURE);
     }
 
-    savefile(fp, version);
+    savefile(fp);
 
     fclose(fp);