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/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F186%2Fhead;p=open-adventure.git 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";