From d466aadf2bfa3a1a23f56d7bb627845614df815d Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Mon, 13 Oct 2008 04:27:50 +0200
Subject: [PATCH] Correct use of uninitialized variable on AIX.

---
 ChangeLog             | 5 +++++
 tests/test-sameacls.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 972387525c..c364853fda 100644
--- 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.
diff --git a/tests/test-sameacls.c b/tests/test-sameacls.c
index 0086cd6974..20b0a4742d 100644
--- a/tests/test-sameacls.c
+++ b/tests/test-sameacls.c
@@ -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);
-- 
2.30.2