Fix some formatting
[oweals/busybox.git] / find.c
diff --git a/find.c b/find.c
index c82b509b6c9f88845b661c7d9aabe3a18fe30448..59a5b838df5032d690e7b673896289d27b5924ff 100644 (file)
--- a/find.c
+++ b/find.c
@@ -26,6 +26,8 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <dirent.h>
+#include <string.h>
+#include <stdlib.h>
 
 
 static char *pattern = NULL;
@@ -35,7 +37,7 @@ static int dereferenceFlag = FALSE;
 static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
 {
        if (pattern == NULL)
-               fprintf(stdout, "%s\n", fileName);
+               puts(fileName);
        else {
                char *tmp = strrchr(fileName, '/');
 
@@ -44,7 +46,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
                else
                        tmp++;
                if (check_wildcard_match(tmp, pattern) == TRUE)
-                       fprintf(stdout, "%s\n", fileName);
+                       puts(fileName);
        }
        return (TRUE);
 }