From: Frédéric Marchal Date: Thu, 30 Jul 2009 12:12:52 +0000 (+0000) Subject: Fixed bug #1814212. X-Git-Tag: v2_2_6~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eee60323a6835f580ec8b7511c4831c7a4e2fa89;p=thirdparty%2Fsarg.git Fixed bug #1814212. --- diff --git a/log.c b/log.c index 45b85f8..f5a180c 100644 --- a/log.c +++ b/log.c @@ -637,7 +637,7 @@ int main(int argc,char *argv[]) if(debug) debuga("sarg %s: %s",text[73],VERSION); - if (strlen(Ulimit) > 0) { + if (Ulimit[0] != '\0') { long l1, l2; int rc=0; @@ -651,19 +651,17 @@ int main(int argc,char *argv[]) l1 = rl.rlim_cur; l2 = rl.rlim_max; - if(Ulimit[0] != '\0') { - rl.rlim_cur = atol(Ulimit); - rl.rlim_max = atol(Ulimit); + rl.rlim_cur = atol(Ulimit); + rl.rlim_max = atol(Ulimit); #if defined(RLIMIT_NOFILE) - rc=setrlimit (RLIMIT_NOFILE, &rl); + rc=setrlimit (RLIMIT_NOFILE, &rl); #elif defined(RLIMIT_OFILE) - rc=setrlimit (RLIMIT_OFILE, &rl); + rc=setrlimit (RLIMIT_OFILE, &rl); #else #warning "No rlimit resource for the number of open files" #endif - if(rc == -1) { - debuga("setrlimit error - %s\n",strerror(errno)); - } + if(rc == -1) { + debuga("setrlimit error - %s\n",strerror(errno)); } if(debug) diff --git a/sarg.1 b/sarg.1 index 4fb3f90..10250e6 100644 --- a/sarg.1 +++ b/sarg.1 @@ -31,7 +31,7 @@ because the author didn't include one in favor of documentation in the GNU Info format; see below. .PP .\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, +.\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBsarg\fP is a tool that allows you to view "where" your users are going to on the Internet. \fBsarg\fP generates reports in HTML, with fields such as: users, @@ -120,10 +120,10 @@ Limits reports to \fIuser\fP activities. Uses \fIdir\fP for temporary files. .TP .B \-x -Writes messages on processes to \fBSTDOUT\fP +Writes debug messages to \fBSTDOUT\fP .TP .B \-z -Writes debug messages to \fBSTDOUT\fP +Writes messages on processes to \fBSTDOUT\fP .TP .B \-convert Convert the logfile's date/time field to human-readable. diff --git a/usage.c b/usage.c index 35715a1..97151e7 100644 --- a/usage.c +++ b/usage.c @@ -46,8 +46,8 @@ void usage(const char *prog) fprintf(stderr, "%5s-t %s [HH, HH:MM]\n"," ",text[31]); fprintf(stderr, "%5s-u %s\n"," ",text[32]); fprintf(stderr, "%5s-w %s\n"," ",text[34]); - fprintf(stderr, "%5s-x %s\n"," ",text[36]); - fprintf(stderr, "%5s-z %s\n"," ",text[35]); + fprintf(stderr, "%5s-x %s\n"," ",text[35]); + fprintf(stderr, "%5s-z %s\n"," ",text[36]); fprintf(stderr, "%5s-convert %s\n"," ",text[76]); fprintf(stderr, "%5s-split %s\n"," ",text[77]); fprintf(stderr, "\n\t%s-%s %s Pedro Lineu Orso - pedro.orso@gmail.com\n",PGM,VERSION,text[78]);