[PATCH] find: implement -empty

Aaro Koskinen aaro.koskinen at iki.fi
Wed Sep 11 15:25:14 UTC 2019


On Wed, Sep 11, 2019 at 09:46:45AM +0200, walter harms wrote:
> is seems possible to simply that a bit (untested version):
> if ( ! S_ISDIR(statbuf->st_mode))
>        return S_ISREG(statbuf->st_mode) && !statbuf->st_size;
> DIR *dir;

Not sure if this is allowed by current busybox coding style:

findutils/find.c:844:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  DIR *dir;


More information about the busybox mailing list