Commit eed4b969 authored by deuce's avatar deuce
Browse files

Open nullfp before assigning it to something (derp).

parent 2dc83051
......@@ -1078,6 +1078,10 @@ int main(int argc, char **argv, char** environ)
confp=stdout;
errfp=stderr;
if((nulfp=fopen(_PATH_DEVNULL,"w+"))==NULL) {
perror(_PATH_DEVNULL);
return(do_bail(-1));
}
if(isatty(fileno(stdin))) {
#ifdef __unix__
struct termios term;
......@@ -1093,10 +1097,6 @@ int main(int argc, char **argv, char** environ)
}
else /* if redirected, don't send status messages to stderr */
statfp=nulfp;
if((nulfp=fopen(_PATH_DEVNULL,"w+"))==NULL) {
perror(_PATH_DEVNULL);
return(do_bail(-1));
}
cb.limit=JAVASCRIPT_TIME_LIMIT;
cb.yield_interval=JAVASCRIPT_YIELD_INTERVAL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment