Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: preparser/preparser-process.cc

Issue 5612006: Use the file opened from argv[1] in preparser-process.cc (Closed)
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: preparser/preparser-process.cc
diff --git a/preparser/preparser-process.cc b/preparser/preparser-process.cc
index 3a83a0a852fa19ceb8be78b553f6ea6912aad06f..26dfc42b53a89256759343e84fcb81bc586bdad3 100644
--- a/preparser/preparser-process.cc
+++ b/preparser/preparser-process.cc
@@ -193,8 +193,8 @@ int main(int argc, char* argv[]) {
FILE* input = stdin;
if (argc > 1) {
char* arg = argv[1];
- FILE* file = fopen(arg, "rb");
- if (!file) return EXIT_FAILURE;
+ input = fopen(arg, "rb");
+ if (input == NULL) return EXIT_FAILURE;
}
int status = 0;
do {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698