From c0d95188917f518f9add204e1902236e94fc631b Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Mon, 9 Jul 2001 11:50:30 +0000 Subject: [PATCH] removed access() call (not necessary) use Skip_blanks macro --- allow.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/allow.c b/allow.c index d13c3a2..130585f 100644 --- a/allow.c +++ b/allow.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: allow.c,v 1.9 2001-06-22 21:10:30 thib Exp $ */ + /* $Id: allow.c,v 1.10 2001-07-09 11:50:30 thib Exp $ */ #include "fcrontab.h" #include "allow.h" @@ -38,12 +38,9 @@ in_file(char *str, char *file) FILE *f = NULL; char *start = NULL; - if ( access(file, F_OK) != 0 ) - /* file does not exist */ - return -1; - if ( (f = fopen(file, "r")) == NULL ) { if (errno == ENOENT) + /* file does not exist */ return -1; else die_e("could not open %s", file); @@ -53,8 +50,7 @@ in_file(char *str, char *file) /* skip leading and trailing blanks, comments */ start = buf; - while ( *start != '\0' && isspace( (int) *start) ) - start++; + Skip_blanks(start); if ( *start == '#' || *start == '\0' ) continue; remove_blanks(start); -- 2.47.3