Le 10/09/2019 à 22:06, Aaro Koskinen a écrit :
+#if ENABLE_FEATURE_FIND_EMPTY
+ACTF(empty)
+{
+       if (S_ISDIR(statbuf->st_mode)) {
+               DIR *dir;
+
+               dir = opendir(fileName);
+               if (!dir) {
+                       bb_simple_perror_msg(fileName);
+                       return FALSE;
+               } else {

You can save an indent level here by removing this else block. Since there is a return before, no need for this else.

+                       struct dirent *dent;
+                       char n = 0;
+
+                       while ((dent = readdir(dir)) != NULL &&
+                              DOT_OR_DOTDOT(dent->d_name) &&
+                              n++ < 2)
+                               ;
+                       closedir(dir);
+                       return !dent;
+               }
+       }
+       return S_ISREG(statbuf->st_mode) && !statbuf->st_size;
+}


_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to