]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Don't check for Dansguardian configuration file existence
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Mon, 22 Dec 2014 13:01:50 +0000 (14:01 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Mon, 22 Dec 2014 13:01:50 +0000 (14:01 +0100)
There is no need to check that the file exists before opening the file. If
it doesn't exist, the error message will say so.

dansguardian_log.c

index 9dc60fc3e4c72cc84b7ed57f50c9067935ffe8ab..627239e9e63fb0079f2686d972defd0a6bfa5907 100644 (file)
@@ -52,11 +52,6 @@ void dansguardian_log(void)
        snprintf(guard_in,sizeof(guard_in),"%s/dansguardian.int_unsort",tmp);
        snprintf(guard_ou,sizeof(guard_ou),"%s/dansguardian.int_log",tmp);
 
-       if(access(DansGuardianConf, R_OK) != 0) {
-               debuga(_("Cannot open DansGuardian config file: %s\n"),DansGuardianConf);
-               exit(EXIT_FAILURE);
-       }
-
        if((fp_guard=fopen(DansGuardianConf,"r"))==NULL) {
                debugapos("dansguardian",_("Cannot open file \"%s\": %s\n"),DansGuardianConf,strerror(errno));
                exit(EXIT_FAILURE);