]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fixed bug #1814212.
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 30 Jul 2009 12:12:52 +0000 (12:12 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 30 Jul 2009 12:12:52 +0000 (12:12 +0000)
log.c
sarg.1
usage.c

diff --git a/log.c b/log.c
index 45b85f8b1cdedebbc2ea6ab2dd9d5993b2ba673f..f5a180c30bcf603fa8c17767e46b720f5445ac41 100644 (file)
--- 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 4fb3f906a533d96de3c6454f1a898f36b2c75f3f..10250e636706f94b3967422bee5d7e6ecbe4b2b3 100644 (file)
--- 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<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" \fI<whatever>\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 35715a1c66a99ba2e9f348fcfdf8f2d789d3dcd9..97151e74113bbb1c3f7c12a55379392d1a5eb7a8 100644 (file)
--- 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]);