mirror of https://github.com/mkerrisk/man-pages
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:
parent
63f0f3d9b8
commit
3326bd1971
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue