Simplify SPDX copyright lines to the shortest canonical form...
[open-adventure.git] / cheat.c
diff --git a/cheat.c b/cheat.c
index ebbc1661397b66e8edf43a3041b4a9b688edadf4..279bcd9e6fc8dddabc8cb6eea798251026dd55e9 100644 (file)
--- a/cheat.c
+++ b/cheat.c
@@ -4,8 +4,7 @@
  * savefile(), so we know we're always outputting save files that advent
  * can import.
  *
- * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods
- * SPDX-FileCopyrightText: 2017 by Eric S. Raymond
+ * SPDX-FileCopyrightText: (C) 1977, 2005 by Will Crowther and Don Woods
  * SPDX-License-Identifier: BSD-2-Clause
  */
 #include <getopt.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);