mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Do not fail with less then two arguments.
svn path=/trunk/; revision=26707
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user