X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fsh%2Fpathcanon.c;h=3b427a83c6f2552c6a5bba59f38317e94578da4d;hb=95732b497d12c98613bb3c5db16b61f377501a59;hp=88929540a3feddbb1e8794f5995c12b620dedbed;hpb=eb87367179effbe5f430236db8259006d71438b7;p=platform%2Fupstream%2Fbash.git diff --git a/lib/sh/pathcanon.c b/lib/sh/pathcanon.c index 8892954..3b427a8 100644 --- a/lib/sh/pathcanon.c +++ b/lib/sh/pathcanon.c @@ -75,10 +75,11 @@ static int _path_isdir (path) char *path; { - int l, x; + int l; struct stat sb; /* This should leave errno set to the correct value. */ + errno = 0; l = stat (path, &sb) == 0 && S_ISDIR (sb.st_mode); #if defined (__CYGWIN__) if (l == 0)