From 95732b497d12c98613bb3c5db16b61f377501a59 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Wed, 7 Dec 2005 14:08:12 +0000 Subject: Imported from ../bash-3.1.tar.gz. --- lib/sh/pathcanon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sh/pathcanon.c') 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) -- cgit v1.2.3