mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
Do not fail with less then two arguments.
svn path=/trunk/; revision=26707
This commit is contained in:
parent
c04165689d
commit
14f97db8a4
1 changed files with 2 additions and 2 deletions
|
@ -79,8 +79,8 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
rdtscll(timeStart);
|
||||
|
||||
randfile = fopen(argv[1],"r");
|
||||
sortfile = fopen(argv[2],"w");
|
||||
randfile = (argc < 2) ? stdin : fopen(argv[1],"r");
|
||||
sortfile = (argc < 3) ? stdout : fopen(argv[2],"w");
|
||||
if (randfile == NULL || sortfile == NULL) {
|
||||
fprintf(stderr,"Could not open all files.\n");
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue