From: Aaron Traas Date: Sun, 2 Jul 2017 06:28:58 +0000 (-0400) Subject: Localize scope for restore file pointer in main. X-Git-Tag: takebird~122 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=3d3cd4ba397018aa9d245b5ce8cb7b4802a82304 Localize scope for restore file pointer in main. --- diff --git a/main.c b/main.c index 1cff0d1..345a7b2 100644 --- a/main.c +++ b/main.c @@ -25,7 +25,7 @@ #define DIM(a) (sizeof(a)/sizeof(a[0])) -FILE *logfp = NULL, *rfp = NULL; +FILE *logfp = NULL; bool oldstyle = false; bool prompt = true; @@ -63,6 +63,7 @@ int main(int argc, char *argv[]) #ifndef ADVENT_NOSAVE const char* opts = "l:or:"; const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename]\n"; + FILE *rfp = NULL; #else const char* opts = "l:o"; const char* usage = "Usage: %s [-l logfilename] [-o]\n";