diff --git a/libmisc/ttytype.c b/libmisc/ttytype.c index 9e5c4e89..a9fb0e86 100644 --- a/libmisc/ttytype.c +++ b/libmisc/ttytype.c @@ -34,13 +34,11 @@ void ttytype (const char *line) if (NULL == typefile) { return; } - if (access (typefile, F_OK) != 0) { - return; - } fp = fopen (typefile, "r"); if (NULL == fp) { - perror (typefile); + if (errno != ENOENT) + perror (typefile); return; } while (fgets (buf, sizeof buf, fp) == buf) {