mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 21:22:24 +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);
|
rdtscll(timeStart);
|
||||||
|
|
||||||
randfile = fopen(argv[1],"r");
|
randfile = (argc < 2) ? stdin : fopen(argv[1],"r");
|
||||||
sortfile = fopen(argv[2],"w");
|
sortfile = (argc < 3) ? stdout : fopen(argv[2],"w");
|
||||||
if (randfile == NULL || sortfile == NULL) {
|
if (randfile == NULL || sortfile == NULL) {
|
||||||
fprintf(stderr,"Could not open all files.\n");
|
fprintf(stderr,"Could not open all files.\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue