[BusyBox] two busybox 0.60.5 patches (insmod/modprobe)
Manuel Novoa III
mjn3 at codepoet.org
Mon Sep 22 21:31:26 UTC 2003
Hello,
On Mon, Sep 22, 2003 at 03:50:05PM -0500, Cam Mayor wrote:
> In modprobe, i added the function int isblank (int c), which is a GNU
> extension, but not part of standard C.
Actually, isblank() is ANSI/ISO C99. You need to update your
documentation.
> +char *basename(char *path)
> +{
> + char * foundloc = strchr(path, '/');
> + if (NULL == foundloc)
> + return path;
> + else
> + return basename(++foundloc);
> +}
> +
Uh... ok... I'm _almost_ speechless. Why on earth would you want to
use recursion here? Take a look at strrchr().
Out of curiosity, which compilers and C libraries are you using?
Manuel
More information about the busybox
mailing list