[hackers] [sbase] Fix pathchk manpage regarding exit status || sin

From: <git_AT_suckless.org>
Date: Thu, 11 Feb 2016 11:09:42 +0100 (CET)

commit 73c8dfafe99d8a45b8652b284b97c5d80bf5b1c5
Author: sin <sin_AT_2f30.org>
AuthorDate: Thu Feb 11 10:04:54 2016 +0000
Commit: sin <sin_AT_2f30.org>
CommitDate: Thu Feb 11 10:09:38 2016 +0000

    Fix pathchk manpage regarding exit status
    
    Also, rename _attr to st.

diff --git a/pathchk.1 b/pathchk.1
index 7f36ffc..4cd0e80 100644
--- a/pathchk.1
+++ b/pathchk.1
_AT_@ -23,7 +23,7 @@ Check for empty pathnames and leading hythens.
 .Sh EXIT STATUS
 .Bl -tag -width Ds
 .It 0
-A filename was not valid or portable.
+All pathname operands passed all of the checks.
 .It > 0
 An error occurred.
 .El
diff --git a/pathchk.c b/pathchk.c
index 6bf4d11..a72e8fd 100644
--- a/pathchk.c
+++ b/pathchk.c
_AT_@ -21,7 +21,7 @@ pathchk(char *filename)
         char *invalid, *invalid_end, *p, *q;
         const char *character_set;
         size_t len, maxlen;
- struct stat _attr;
+ struct stat st;
 
         /* Empty? */
         if (extra && !*filename) {
_AT_@ -52,7 +52,7 @@ pathchk(char *filename)
         }
 
         /* Symlink error? Non-searchable directory? */
- if (lstat(filename, &_attr) && errno != ENOENT) {
+ if (lstat(filename, &st) && errno != ENOENT) {
                 /* lstat rather than stat, so that if filename is a bad symlink, but
                  * all parents are OK, no error will be detected. */
                 weprintf("%s: %s:", argv0, filename);
Received on Thu Feb 11 2016 - 11:09:42 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 11 2016 - 11:12:31 CET