Fix some formatting
[oweals/busybox.git] / find.c
diff --git a/find.c b/find.c
index a86b07e73534ab5e9eea10a5d0f115bee8b1fda4..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);
 }
@@ -98,7 +100,7 @@ int find_main(int argc, char **argv)
                        break;
        }
 
-       if (recursiveAction(directory, TRUE, FALSE, FALSE,
+       if (recursive_action(directory, TRUE, FALSE, FALSE,
                                                fileAction, fileAction, NULL) == FALSE) {
                return EXIT_FAILURE;
        }