From: Frédéric Marchal Date: Sun, 26 Aug 2012 15:24:37 +0000 (+0200) Subject: Remove trailing spaces X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b902df7e4e8f3f07a1c972395a22e79d8da351d9;p=thirdparty%2Fsarg.git Remove trailing spaces --- diff --git a/dichotomic.c b/dichotomic.c index b81129e..b58f0ca 100644 --- a/dichotomic.c +++ b/dichotomic.c @@ -111,7 +111,7 @@ static int Dichotomic_FindKeyPos(DichotomicObject Obj,const char *key,bool *Foun { middle=(down+up)/2; cmp=strcasecmp(key,Obj->Items[middle].Key); - if (!cmp) + if (!cmp) { *Found=true; return(middle); diff --git a/exclude.c b/exclude.c index a4abf77..0c01054 100644 --- a/exclude.c +++ b/exclude.c @@ -65,7 +65,7 @@ static char *excludeuser=NULL; /*! Store a IPv4 address to exclude from the reported URL. - + \param addr The 4 char of the address. \param nbits The number of bits to keep in the prefix. */ @@ -93,7 +93,7 @@ static void store_exclude_ip4(unsigned char *addr,int nbits) /*! Store a IPv6 address to exclude from the reported URL. - + \param addr The 8 short int of the address. \param nbits The number of bits to keep in the prefix. */ @@ -120,7 +120,7 @@ static void store_exclude_ip6(unsigned short *addr,int nbits) /*! Store a host name to exclude from the report. - + \param url The host name to exclude. */ static void store_exclude_url(const char *url,const char *next) @@ -177,7 +177,7 @@ static void store_exclude_url(const char *url,const char *next) /*! Read the file listing the host to exclude from the report. - + \param hexfile The name of the file. \param debug \c True to print debug information. */ @@ -230,9 +230,9 @@ void gethexclude(const char *hexfile, int debug) /*! Check if the URL is excluded as per the host exclusion list. - + \param url The URL to check. - + \retval 1 Keep the URL. \retval 0 Exclude the URL. */ diff --git a/include/readlog.h b/include/readlog.h index 8e18b5b..e286135 100644 --- a/include/readlog.h +++ b/include/readlog.h @@ -14,7 +14,7 @@ enum ReadLogReturnCodeEnum RLRC_Unknown, //! Error encountered during the parsing of the file. RLRC_InternalError, - + RLRC_LastRetCode //!< last entry of the list. }; @@ -31,7 +31,7 @@ struct ReadLogStruct char *User; /*! The URL of the visited site. - + The pointer may be NULL if the URL doesn't exists in the log file. */ char *Url; diff --git a/readlog_common.c b/readlog_common.c index b05e4cb..af85312 100644 --- a/readlog_common.c +++ b/readlog_common.c @@ -76,7 +76,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru Entry->User=++Line; for (UserLen=0 ; *Line && *Line!=' ' ; UserLen++) Line++; if (*Line!=' ' || UserLen==0) return(RLRC_Unknown); - + if (squid24) { // squid version > 2.4 store the user ID in the first column: skip the second column here Begin=++Line; @@ -103,7 +103,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru Year=0; while (isdigit(*Line)) Year=Year*10+(*Line++-'0'); if (*Line!=':' || Year<1900 || Year>2200) return(RLRC_Unknown); - + // get the time ++Line; Hour=0; @@ -121,7 +121,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru // skip the timezone up to the closing ] while (*Line && *Line!=']') Line++; if (*Line!=']') return(RLRC_Unknown); - + Entry->EntryTime.tm_year=Year-1900; Entry->EntryTime.tm_mon=Month; Entry->EntryTime.tm_mday=Day; @@ -135,17 +135,17 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru if (*Line!=' ') return(RLRC_Unknown); ++Line; if (*Line!='\"') return(RLRC_Unknown); - + // skip the HTTP function Begin=++Line; while (isalpha(*Line)) Line++; if (*Line!=' ' || Line==Begin) return(RLRC_Unknown); - + // get the URL Entry->Url=++Line; for (UrlLen=0 ; *Line && *Line!=' ' ; UrlLen++) Line++; if (*Line!=' ' || UrlLen==0) return(RLRC_Unknown); - + // skip the HTTP/... ++Line; while (*Line && *Line!='\"') Line++; @@ -157,7 +157,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru Entry->HttpCode=++Line; for (HttpCodeLen=0 ; *Line && *Line!=' ' ; HttpCodeLen++) Line++; if (*Line!=' ' || HttpCodeLen==0) return(RLRC_Unknown); - + // get the number of transfered bytes. Begin=++Line; Entry->DataSize=0LL; @@ -175,7 +175,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru Entry->HttpCode[HttpCodeLen]='\0'; Entry->Url[UrlLen]='\0'; Entry->User[UserLen]='\0'; - + return(RLRC_NoError); } diff --git a/util.c b/util.c index 2291ca4..70cba41 100644 --- a/util.c +++ b/util.c @@ -1197,7 +1197,7 @@ int vrfydir(const struct periodstruct *per1, const char *addr, const char *site, /*! Copy a string without overflowing the buffer. The copied string is properly terminated by an ASCII zero. - + \param dest The destination buffer. \param src The source buffer. \param length The size of the destination buffer. The program is aborted @@ -1798,7 +1798,7 @@ void output_html_url(FILE *fp_ou,const char *url) Write a host name inside an A tag of a HTML file. If the host name starts with a star, it is assumed to be an alias that cannot be put inside a link so the A tag is not written around the host name. - + \param fp_ou The handle of the HTML file. \param url The host to display in the HTML file. \param maxlen The maximum number of characters to print into the host name.