scandir.3: Improve EXAMPLE source code: s/0/NULL/ in scandir() call

Reported-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-04-25 17:00:22 +12:00
parent 63f0f3d9b8
commit 3326bd1971
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ main(void)
struct dirent **namelist;
int n;
n = scandir(".", &namelist, 0, alphasort);
n = scandir(".", &namelist, NULL, alphasort);
if (n < 0)
perror("scandir");
else {