]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - auth.c
Give a try to splint and apply a few of the recommandations
[thirdparty/sarg.git] / auth.c
diff --git a/auth.c b/auth.c
index 341eea86b8089a4b361aaca9cf08fdbd075ec77c..5a5481415ff159caf1efafb24961e385a63e16c4 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -33,23 +33,23 @@ void htaccess(const struct userinfostruct *uinfo)
    char line[MAXLEN];
    FILE *fp_in;
    FILE *fp_auth;
-   int i, nread;
+   size_t i,nread;
 
    if(!UserAuthentication)
       return;
 
    if (snprintf(htname,sizeof(htname),"%s/%s/.htaccess",outdirname,uinfo->filename)>=sizeof(htname)) {
       debuga(_("File name too long: %s/%s/.htaccess\n"),outdirname,uinfo->filename);
-      exit(1);
+      exit(EXIT_FAILURE);
    }
    if((fp_auth=fopen(htname,"w"))==NULL) {
       debuga(_("(auth) Cannot open file: %s - %s\n"),htname,strerror(errno));
-      exit(1);
+      exit(EXIT_FAILURE);
    }
 
    if ((fp_in=fopen(AuthUserTemplateFile,"r"))==NULL) {
       debuga(_("(auth) Cannot open template file: %s - %s\n"),AuthUserTemplateFile,strerror(errno));
-      exit(1);
+      exit(EXIT_FAILURE);
    }
 
    while((nread=fread(line,1,sizeof(line),fp_in))!=0) {