From 12c63fb457a35bbb20caac34ac6bd308234c55af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Wed, 1 Feb 2012 20:47:37 +0100 Subject: [PATCH] Cleanup the use of a supernumerary url variable Two redundant pointers were making the code more confusing. --- log.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/log.c b/log.c index dd40024..dda4dbe 100644 --- a/log.c +++ b/log.c @@ -108,7 +108,6 @@ int main(int argc,char *argv[]) char *linebuf; const char *url; char *full_url; - char *urly; char user[MAX_USER_LEN]; char splitprefix[MAXLEN]; enum InputLogFormat ilf; @@ -1325,8 +1324,6 @@ int main(int argc,char *argv[]) for (str=code ; *str ; str++) if (*str=='\t') *str=' '; - urly=full_url; - if(ilf!=ILF_Sarg) { /* The full URL is not saved in sarg log. There is no point in testing the URL to detect @@ -1520,13 +1517,13 @@ int main(int argc,char *argv[]) if((ReportType & REPORT_TYPE_DENIED) != 0) { if(fp_denied && strstr(code,"DENIED/403") != 0) { - fprintf(fp_denied, "%s\t%s\t%s\t%s\t%s\n",dia,hora,user,ip,urly); + fprintf(fp_denied, "%s\t%s\t%s\t%s\t%s\n",dia,hora,user,ip,full_url); denied_count++; } } if((ReportType & REPORT_TYPE_AUTH_FAILURES) != 0) { if(fp_authfail && (strstr(code,"DENIED/401") != 0 || strstr(code,"DENIED/407") != 0)) { - fprintf(fp_authfail, "%s\t%s\t%s\t%s\t%s\n",dia,hora,user,ip,urly); + fprintf(fp_authfail, "%s\t%s\t%s\t%s\t%s\n",dia,hora,user,ip,full_url); authfail_count++; } } -- 2.47.2