diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-16 22:45:50 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-03-16 22:45:50 +1300 |
commit | 04b7b03256284c0bfc2ad4aafbe1209114a6f96b (patch) | |
tree | 046fbf84a8472c30f9a376f990de5efd346a6241 /ls.c | |
parent | ls(1) works, doesn't even sort yet though (diff) | |
download | tunics-04b7b03256284c0bfc2ad4aafbe1209114a6f96b.tar.gz tunics-04b7b03256284c0bfc2ad4aafbe1209114a6f96b.zip |
Fix a couple of bugs clang found
Diffstat (limited to 'ls.c')
-rw-r--r-- | ls.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ #include <stdlib.h> #include <sys/types.h> -int main(int argc, char **argv) +int main(void) { struct dirent *dirent; DIR *dir; @@ -11,7 +11,7 @@ int main(int argc, char **argv) dir = opendir("."); while ((dirent = readdir(dir)) != NULL) { - fprintf(stdout, "%s\n", &(dirent->d_name)); + fprintf(stdout, "%s\n", dirent->d_name); } exit(EXIT_SUCCESS); |