Преглед изворни кода

Fix a couple silly bugs in this test

Eric Andersen пре 23 година
родитељ
комит
40c90e71e7
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      test/stdlib/qsort.c

+ 2 - 1
test/stdlib/qsort.c

@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <dirent.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 int select_files(const struct dirent *dirbuf)
 {
@@ -33,7 +34,7 @@ int main(void)
 	dirbuf = array[i];
 	printf("[%d] %s\n", i, dirbuf->d_name);
     }                                          
-    printf("\nCalling qsort()\n", numdir);                   
+    printf("\nCalling qsort()\n");                   
     qsort(array, numdir, sizeof(struct dirent *), alphasort);
     for (i = 0; i < numdir; ++i) {                           
 	dirbuf = array[i];