]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
removed access() call (not necessary)
authorThibault Godouet <yo8192@users.noreply.github.com>
Mon, 9 Jul 2001 11:50:30 +0000 (11:50 +0000)
committerThibault Godouet <yo8192@users.noreply.github.com>
Mon, 9 Jul 2001 11:50:30 +0000 (11:50 +0000)
use Skip_blanks macro

allow.c

diff --git a/allow.c b/allow.c
index d13c3a2a70cd45efbecd6ab4e85b6e397b3740e3..130585f867dd5d166a57aa4e20e2c1a7d0a9d4ef 100644 (file)
--- 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);