diff --git a/contrib/tzcode/stdtime/localtime.c b/contrib/tzcode/stdtime/localtime.c index 632a8d4a89ba..009136de7031 100644 --- a/contrib/tzcode/stdtime/localtime.c +++ b/contrib/tzcode/stdtime/localtime.c @@ -398,7 +398,6 @@ register const int doextend; if (name == NULL && (name = TZDEFAULT) == NULL) return -1; { - int doaccess; struct stat stab; /* ** Section 4.9.1 of the C standard says that @@ -415,8 +414,7 @@ register const int doextend; if (name[0] == ':') ++name; - doaccess = name[0] == '/'; - if (!doaccess) { + if (name[0] != '/') { if ((p = TZDIR) == NULL) { free(fullname); return -1; @@ -428,17 +426,8 @@ register const int doextend; (void) strcpy(fullname, p); (void) strcat(fullname, "/"); (void) strcat(fullname, name); - /* - ** Set doaccess if '.' (as in "../") shows up in name. - */ - if (strchr(name, '.') != NULL) - doaccess = TRUE; name = fullname; } - if (doaccess && access(name, R_OK) != 0) { - free(fullname); - return -1; - } if ((fid = _open(name, OPEN_MODE)) == -1) { free(fullname); return -1;