9
0
Fork 0

fs readdir: check for NULL pointer again

This got lost in:

commit 6188685091
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Sun May 13 12:43:58 2012 +0200

    Make errno a positive value

    Normally errno contains a positive error value. A certain unnamed developer
    mixed this up while implementing U-Boot-v2. Also, normally errno is never
    set to zero by any library function.
    This patch fixes this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-05-14 21:44:31 +02:00
parent 7b5817e58d
commit 9963bb4d15
1 changed files with 3 additions and 0 deletions

View File

@ -1077,6 +1077,9 @@ struct dirent *readdir(DIR *dir)
{
struct dirent *ent;
if (!dir)
return NULL;
ent = dir->fsdrv->readdir(dir->dev, dir);
if (!ent)