aboutsummaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-03-16 22:45:50 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-03-16 22:45:50 +1300
commit04b7b03256284c0bfc2ad4aafbe1209114a6f96b (patch)
tree046fbf84a8472c30f9a376f990de5efd346a6241 /ls.c
parentls(1) works, doesn't even sort yet though (diff)
downloadtunics-04b7b03256284c0bfc2ad4aafbe1209114a6f96b.tar.gz
tunics-04b7b03256284c0bfc2ad4aafbe1209114a6f96b.zip
Fix a couple of bugs clang found
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ls.c b/ls.c
index 592d6f3..768897d 100644
--- a/ls.c
+++ b/ls.c
@@ -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);