test-chown.h: correct a cast
authorJim Meyering <meyering@redhat.com>
Sun, 10 Apr 2011 07:30:22 +0000 (09:30 +0200)
committerIan Beckwith <ianb@erislabs.net>
Wed, 13 Apr 2011 22:42:45 +0000 (23:42 +0100)
* tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t)
when the destination is a stat.st_gid.
(cherry picked from commit 5e29a7a095a6c960115cf48f5b28278194a0b2ca)

ChangeLog
tests/test-chown.h

index b52f24a..0290a0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-10  Jim Meyering  <meyering@redhat.com>
+
+       test-chown.h: correct a cast
+       * tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t)
+       when the destination is a stat.st_gid.
+
 2011-04-09  Mats Erik Andersson  <mats.andersson@gisladisker.se>  (tiny change)
 
        getaddrinfo: Fix test for sa_len member.
index 7630de4..c99ffc1 100644 (file)
@@ -71,7 +71,7 @@ test_chown (int (*func) (char const *, uid_t, gid_t), bool print)
   ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
   ASSERT (stat (BASE "dir/file", &st1) == 0);
   ASSERT (st1.st_uid != (uid_t) -1);
-  ASSERT (st1.st_gid != (uid_t) -1);
+  ASSERT (st1.st_gid != (gid_t) -1);
   ASSERT (st1.st_gid == getegid ());
 
   /* Sanity check of error cases.  */