Correct use of uninitialized variable on AIX.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Oct 2008 02:27:50 +0000 (04:27 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Oct 2008 02:27:50 +0000 (04:27 +0200)
ChangeLog
tests/test-sameacls.c

index 972387525c456f1fa6ac09ce6e6f5081e417d0c3..c364853fda8b94c8ae95b817d300ee99157406ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-12  Bruno Haible  <bruno@clisp.org>
+
+       * tests/test-sameacls.c (main) [AIX]: Clear type argument before
+       calling aclx_get.
+
 2008-10-12  Bruno Haible  <bruno@clisp.org>
 
        Use msvcrt aware primitives for creation/termination of Win32 threads.
index 0086cd6974f2d15d293c05c03e61c57cbaebcae3..20b0a4742de50875e80e502b6eb6bd60a7f3ce91 100644 (file)
@@ -447,6 +447,7 @@ main (int argc, char *argv[])
   mode_t mode2;
   char text2[1000];
 
+  memset (&type1, 0, sizeof (type1)); /* type1 = ACL_ANY */
   if (aclx_get (file1, 0, &type1, acl1, &aclsize1, &mode1) < 0)
     {
       fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
@@ -460,6 +461,7 @@ main (int argc, char *argv[])
       abort ();
     }
 
+  memset (&type2, 0, sizeof (type2)); /* type2 = ACL_ANY */
   if (aclx_get (file2, 0, &type2, acl2, &aclsize2, &mode2) < 0)
     {
       fprintf (stderr, "error accessing the ACLs of file %s\n", file2);