]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(gobble_file) [USE_ACL]: Set have_acl member unconditionally
authorJim Meyering <jim@meyering.net>
Sun, 3 Dec 2000 22:40:31 +0000 (22:40 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 3 Dec 2000 22:40:31 +0000 (22:40 +0000)
to avoid uninitialized memory reference via FILE_HAS_ACL.

src/ls.c

index ef504202bbf4d1253a4d7f08e9c6a30289c4a427..7782b1dc1fc3f90c02f10865323fc4e60b5163f7 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -1899,8 +1899,9 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
        }
 
 #if USE_ACL
-      if (! S_ISLNK (files[files_index].stat.st_mode))
-       files[files_index].have_acl = (4 < acl (path, GETACLCNT, 0, NULL));
+      files[files_index].have_acl =
+       (! S_ISLNK (files[files_index].stat.st_mode)
+        && 4 < acl (path, GETACLCNT, 0, NULL));
 #endif
 
       if (S_ISLNK (files[files_index].stat.st_mode)